Click the Start a free trial link to start a 15-day SaaS trial of our product and join our community as a trial user. If you are an existing customer do not start a free trial.
AppDynamics customers and established members should click the sign in button to authenticate.
03-28-2020 10:16 PM - last edited on 03-30-2020 09:57 AM by Ryan.Paredez
I am trying to set up my Cordova application with AppDynamic using EUM. With the iPhone, I was able to set it up using the provided Cordova plugin (appd-plugin-eum-mobile). However, for android, I am not able to install the application on my phone when appd plugin is added.
I am getting the below error when trying to install the Android apk on my device or simulator. I have tried to follow your documentation on my existing Cordova project and also on a new empty Cordova project but I get the same exception. Additionally, I have to also create a blank android project and followed the steps to manually install the android AppD agent but I end up with the same results.
I have tried a combination of the Gradle version with the AppD version. But I was never able to install my apk on my phone or simulator and ended up with the below error.
I believe `gradle plugin 'adeum'` is giving some issue when generation the APK.
The project gets built successfully but fails to install on the device. I was able to instrument my iOS application.
Build Fail Error: Installation did not succeed. The application could not be installed: INSTALL_FAILED_INVALID_APK The APKs are invalid.
Logcat Console: 2020-03-27 17:57:08.202 4911-4911/? I/studio.deploy: Streaming succeeded for '/data/app/com.example.myapplication-V0VU29_rzIMVeWBTR4be6A==/base.apk' 2020-03-27 17:57:08.202 4911-4911/? I/studio.deploy: package 2020-03-27 17:57:08.202 4911-4911/? I/studio.deploy: install-commit 2020-03-27 17:57:08.202 4911-4911/? I/studio.deploy: 2047134392 2020-03-27 17:56:18.605 2360-2942/? D/PowerUI: can't show warning due to - plugged: true status unknown: false 2020-03-27 17:57:08.301 1291-1336/? I/ActivityManager: Force stopping com.example.myapplication appid=10234 user=-1: installPackageLI 2020-03-27 17:57:08.301 1291-1351/? W/PackageManager: Scanning Failed. com.android.server.pm.PackageManagerException: Package /data/app/com.example.myapplication-MFkL8J6KrcEk8s6fIMCuvw==/base.apk code is missing at com.android.server.pm.PackageManagerService.assertCodePolicy(PackageManagerService.java:11561) at com.android.server.pm.PackageManagerService.assertPackageIsValid(PackageManagerService.java:11719) at com.android.server.pm.PackageManagerService.scanPackageNewLI(PackageManagerService.java:10962) at com.android.server.pm.PackageManagerService.scanPackageTracedLI(PackageManagerService.java:10729) at com.android.server.pm.PackageManagerService.installPackagesLI(PackageManagerService.java:16986) at com.android.server.pm.PackageManagerService.installPackagesTracedLI(PackageManagerService.java:16315) at com.android.server.pm.PackageManagerService.lambda$processInstallRequestsAsync$13$PackageManagerService(PackageManagerService.java:14598) at com.android.server.pm.-$$Lambda$PackageManagerService$S4WxZjKnT0iu1kmEXSrs7BiizN4.run(Unknown Source:6) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.os.HandlerThread.run(HandlerThread.java:67) at com.android.server.ServiceThread.run(ServiceThread.java:44) 2020-03-27 17:57:08.302 1009-1630/? E/installd: Failed to delete /data/app/vmdl2047134392.tmp: No such file or directory 2020-03-27 17:57:08.307 4911-4911/? E/studio.deploy: Failure [INSTALL_FAILED_INVALID_APK: Scanning Failed.: Package /data/app/com.example.myapplication-MFkL8J6KrcEk8s6fIMCuvw==/base.apk code is missing]
Android Studio: 3.6.1 Gradle Version 5.6.4 and 6.2.2 AppD Android Agent: 5.3.1558 and 5.3.1565 Cordova Version: 8.0.0 Android version: 10
Solved! Go to Solution.
03-30-2020 02:59 PM
This is a recent incompatibility issue reported by some other customers using Android Studio 3.6. Our development team is aware and working on this but I am unable to provide any timelines.
Can you confirm if this only affects Debut builds or if it affects Release builds as well?
Please feel free to create a support ticket for this issue: https://help.appdynamics.com/hc/en-us/requests/
04-28-2020 11:28 PM - edited 04-29-2020 01:03 AM
Confirmed same problem with Gradle Build Tools version 3.6.2
Downgrading to 3.5.0 is a workaround
Note that this is NOT just a problem with Cordova projects! Ours is regular Android
05-04-2020 12:05 PM
Thank you @Frode.Nilsen for confirming.
05-12-2020 03:01 PM - edited 05-12-2020 11:53 PM
Have the same version on our native Android project (not Cordova) too
Android plugin: 3.6.3
AppDynamics: 5.2.1552 and 20.4.0
The same project setup works if Android plugin downgraded to 3.5.X version
The same project setup works with Android plugin 3.6.X and removed AppDynamics
Do you guys have any timelines for fixing the issue or reference to some open bug to track its progress? It is a bit disappointing that this plugin basically blocks upgrading projects using AppDynamics to use latest Android tools. In our organization we have relatively big Android team and no one able to use latest tools already for 2 months because of the issue without removing AppDynamics plugin.
I just hope you understand that the issue is critical and probably such issues should be resolved much faster, because using outdated tools for few months (Android plugin in this case) affects teams productivity and have cost, so at some point teams will have to switch to some other tool
05-12-2020 10:51 PM
05-14-2020 02:12 AM
Looks like the issue is fixed in `20.5.0` - after updating to this version for us the issue is gone
06-10-2020 12:26 AM
Confirmed fixed in latest build
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form