cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

AppDynamic EUM setup for Android Cordova project

Hiren.Mistry
Creator

Hello,

 

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

 

 

7 REPLIES 7

Philip.Rogers
AppDynamics Team (Retired)

Hi Hiren-

 

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/




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

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

Philip.Rogers
AppDynamics Team (Retired)

Thank you @Frode.Nilsen for confirming. 




Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Nick.Silin
Builder

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

Thanks for the update and investigations for the AppD plugin. 

 

However, I will wait for the latest build that fixes this issue. Untill then i would like to keep this discussion open. 

Nick.Silin
Builder

Looks like the issue is fixed in `20.5.0` - after updating to this version for us the issue is gone

Confirmed fixed in latest build

On-Demand Webinar
Discover new Splunk integrations and AI innovations for Cisco AppDynamics.


Register Now!

Observe and Explore
Dive into our Community Blog for the Latest Insights and Updates!


Read the blog here
Top Kudoed Authors