Bonjour, je suis en difficulté avec l'installation d'un plugin cordova: cordova-plugin-firebasePourquoi ai-je erreur AbstractSafeParcelable pas trouvé à Cordova Firebase plug-in
Voici la sortie de construction:
BUILD FAILED
Total time: 1.223 secs
Error: /home/thor/Projects/App_CDP/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/thor/Projects/App_CDP/platforms/android/src/plugin/google/maps/GoogleMaps.java:479: error: cannot access AbstractSafeParcelable
options.compassEnabled(controls.getBoolean("compass"));
^
class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found
/home/thor/Projects/App_CDP/platforms/android/src/plugin/google/maps/GoogleMaps.java:717: error: cannot find symbol
String msg = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(activity);
^
symbol: method getOpenSourceSoftwareLicenseInfo(Activity)
location: class GooglePlayServicesUtil
/home/thor/Projects/App_CDP/platforms/android/src/plugin/google/maps/AsyncLicenseInfo.java:22: error: cannot find symbol
String licenseInfo = GooglePlayServicesUtil.getOpenSourceSoftwareLicenseInfo(mActivity);
^
symbol: method getOpenSourceSoftwareLicenseInfo(Activity)
location: class GooglePlayServicesUtil
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.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
J'ai trouvé que c'était parce com.google.android.gms:play-services-maps
et com.google.firebase:firebase-messaging
ne relevaient pas de la même version, mais je ne peux pas modifier mon build.gradle
car il est généré chaque fois que je construis
$ cat platforms/android/build.gradle
[...]
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile(project(path: "CordovaLib", configuration: "debug"))
releaseCompile(project(path: "CordovaLib", configuration: "release"))
compile "com.google.gms:google-services:+"
compile "com.google.firebase:firebase-core:+"
compile "com.google.firebase:firebase-messaging:+"
compile "com.google.firebase:firebase-crash:+"
compile "com.google.firebase:firebase-config:+"
compile "com.google.android.gms:play-services-maps:9.8.0"
compile "com.google.android.gms:play-services-location:9.8.0"
compile "com.facebook.android:facebook-android-sdk:4.+"
// SUB-PROJECT DEPENDENCIES END
}
[...]
Une idée?
Quand je le compiler dire qu'il est dépréciée et sera supprimée dans gradle 5 est-il un bon choix pour l'utiliser en tous cas ? – Biboozz
La pile de construction Cordova utilise des API obsolètes partout - je ne m'inquiéterais pas à ce sujet – DaveAlden
Très bien, merci: D. Au fait avez-vous une idée pour les 2 autres erreurs: ne peut pas trouver le symbole? J'ai trouvé ce sujet lié https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1646 mais je ne suis pas vraiment familier avec cordova et je ne comprends pas vraiment bien le problème:/ – Biboozz