2017-10-04 106 views
0

你好,我是在安裝了一個插件科爾多瓦麻煩:科爾多瓦 - 插件 - 火力爲什麼我收到AbstractSafeParcelable沒有發現錯誤科爾多瓦火力地堡插件

這裏構建的輸出:

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. 

我發現,這是因爲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 
} 

[...] 

有什麼想法?

回答

0

您可以嘗試使用cordova-android-play-services-gradle-release覆蓋播放服務的版本與火力地堡對齊:

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

當我編譯它說,它已被棄用,將在gradle這個5除去它是一個不錯的選擇使用它無論如何? – Biboozz

+0

Cordova構建堆棧遍地都使用不推薦的API - 我不擔心它 – DaveAlden

+0

好的,謝謝:D。順便說一下,你有2個其他錯誤的想法:無法找到符號? 我發現這個主題相關的https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1646但我不是很熟悉科爾多瓦,我不太明白這個問題:/ – Biboozz