简体   繁体   English

为什么在Cordova Firebase插件中找不到AbstractSafeParcelable错误

[英]Why am I getting AbstractSafeParcelable not found error in Cordova Firebase plugin

Hello I'm in trouble with the installation of a cordova plugin : cordova-plugin-firebase 您好,我在安装cordova插件时遇到了麻烦:cordova-plugin-firebase

Here the output of build : 这是build的输出:

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.

I found that it was because com.google.android.gms:play-services-maps and com.google.firebase:firebase-messaging were not under the same version but i can't edit my build.gradle because it is generated every time i build 我发现这是因为com.google.android.gms:play-services-mapscom.google.firebase:firebase-messaging不在同一版本下,但是我无法编辑build.gradle因为它每次生成我建造的时间

$ 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
}

[...]

Any idea ? 任何想法 ?

您可以尝试使用cordova-android-play-services-gradle-release覆盖Play服务的版本以与Firebase保持一致:

cordova plugin add cordova-android-play-services-gradle-release --variable PLAY_SERVICES_VERSION=+

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么在使用ionic 3 cordova本机插件的verifyPhoneNumber方法时没有收到OTP SMS? - why i am not getting OTP SMS when using verifyPhoneNumber method of ionic 3 cordova native plugin? 为什么我收到错误没有为 MediaController(ClassNAme) 找到合适的构造函数? - Why I am getting an Error No suitable constructor found for MediaController(ClassNAme )? 为什么我会收到默认的 Activity not found 错误? - Why am I getting a default Activity not found error? 为什么在Android的ExifInterface上出现File not found错误? - Why am I getting File not found error for ExifInterface with Android? 当我尝试使用以下科尔多瓦google maps插件https://github.com/mapsplugin/cordova-plugin-googlemaps时出现错误 - I am getting an error when I tried to use the following cordova google maps plugin https://github.com/mapsplugin/cordova-plugin-googlemaps 为什么在Firebase中的onChildAdded中得到NullPointerException? - Why am I getting NullPointerException in onChildAdded in Firebase? 错误:无法访问com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable的AbstractSafeParcelable类文件 - error: cannot access AbstractSafeParcelable class file for com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable not found 我收到错误:未找到键入“Completer”。 使用 flutter Webview 插件时 - I am getting Error: Type 'Completer' not found. when using flutter Webview plugin 为什么我没有找到测试? - Why Am I getting no tests found? 为什么我要科尔多瓦建立android问题“意外令牌”? - Why am I getting cordova build android issue 'unexpected token'?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM