Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error for android #805

Closed
rolinger opened this issue Aug 20, 2018 · 5 comments
Closed

Build error for android #805

rolinger opened this issue Aug 20, 2018 · 5 comments

Comments

@rolinger
Copy link

rolinger commented Aug 20, 2018

Cordova 7.0.1
cordova-android@6.3

I needed to upgrade my app from android@6.2.3 to @6.3 - during the rebuild I am add a plugin, recompile, verify errors or warnings, then go on to next plugin.

With about 30 plugins successfully installed, I start to get to the ones that require specific versions of Android-SDKs and play-services version.

I install these first:

cordova plugin add cordova-android-play-services-gradle-release  --variable PLAY_SERVICES_VERSION=15.+  //REM (ver 1.4.3)
cordova plugin add cordova-android-support-gradle-release //REM (ver 1.4.4)

Next I install the following and get warnings, but it still compiles successfully:
cordova plugin add cordova-plugin-request-location-accuracy //REM 2.2.3
Compile Warnings:

C:\Users\RPO\dev\Whipster_0.2.5\platforms\android\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\15.0.1\jars\classes.jar(com/google/android/gms/common/api/GoogleApiClient.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy': class file for javax.annotation.concurrent.GuardedBy not found

Finally, I install cordova-plugin-firebase (v1.0.5) and get the following warnings which cause the build to fail:

C:\Users\RPO\dev\Whipster_0.2.5\platforms\android\build\intermediates\exploded-aar\com.google.firebase\firebase-common\16.0.1\jars\classes.jar(com/google/firebase/FirebaseApp.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
C:\Users\RPO\dev\Whipster_0.2.5\platforms\android\build\intermediates\exploded-aar\com.google.firebase\firebase-iid\17.0.0\jars\classes.jar(com/google/firebase/iid/FirebaseInstanceId.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
C:\Users\RPO\dev\Whipster_0.2.5\platforms\android\build\intermediates\exploded-aar\com.google.firebase\firebase-iid\17.0.0\jars\classes.jar(com/google/firebase/iid/FirebaseInstanceId.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
C:\Users\RPO\dev\Whipster_0.2.5\platforms\android\build\intermediates\exploded-aar\com.google.firebase\firebase-config\16.0.0\jars\classes.jar(com/google/firebase/remoteconfig/FirebaseRemoteConfig.class): warning: Cannot find annotation method 'value()' in type 'GuardedBy'
C:\Users\RPO\dev\Whipster_0.2.5\platforms\android\build\intermediates\exploded-aar\com.google.firebase\firebase-crash\16.0.1\jars\classes.jar(com/google/firebase/crash/FirebaseCrash.class): warning: Cannot find annotation method 'value()' in type 'UsedByReflection': class file for com.google.android.apps.common.proguard.UsedByReflection not found
C:\Users\RPO\dev\Whipster_0.2.5\platforms\android\build\intermediates\exploded-aar\com.google.firebase\firebase-crash\16.0.1\jars\classes.jar(com/google/firebase/crash/FirebaseCrash.class): warning: Cannot find annotation method 'value()' in type 'UsedByReflection'
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
7 warnings

And then the build fails on:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/measurement/zzkt;
@rolinger
Copy link
Author

I tried cordova clean but it did not help. Project stuck until this firebase issue is resolved.

@soumak77
Copy link
Contributor

soumak77 commented Sep 4, 2018

@rolinger try installing the new plugin cordova-android-firebase-gradle-release as mentioned in the README

@soumak77
Copy link
Contributor

soumak77 commented Sep 4, 2018

Closing as fixed per the updated instructions in the README. Please reopen if this issue persists with the latest version after following those instructions.

@soumak77 soumak77 closed this as completed Sep 4, 2018
@rolinger
Copy link
Author

rolinger commented Sep 4, 2018

I was finally able to get everything installed with Cordova 8.0 and cordova-android 7.1.1 using cordova-plugin-firebase 1.0.5

@dland512
Copy link

dland512 commented Nov 5, 2018

FYI, I was getting this issue until I realized that I was using version 6.3.0 of the cordova android platform, and this plugin currently supports 6.4.0 and up. Once I upgraded, it worked fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants