![](/img/trans.png)
[英]Phonegap Build: Could not find any version that matches com.google.android.gms:play-services-gcm:12+
[英]Could not find any version that matches com.google.android.gms:play-services-gcm:12+ (
我正在嘗試使用Android上的cordova 6.5.0在ionic 3.20上進行編譯。
我正在執行cordova run android
但每次我得到:
Error: ~/Develop/blastbot-ionic/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
> Could not find any version that matches com.google.android.gms:play-services-gcm:12+.
Versions that do not match:
11.0.4
11.0.2
11.0.1
11.0.0
10.2.6
+ 18 more
Required by:
:android:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
我已經安裝了所有這些: SDK Manager
我已經嘗試執行cordova platform rm android
和cordova platform rm android@6.2
或cordova platform rm android
。 兩者以相同的結果結束。 下載了一百萬個不同的SDK版本。
我嘗試了cordova platform add android@5
,然后cordova run android
,它就像一個魅力。
更新
該行從某種程度上“解決”了該問題,但我的目標API級別是23,而不是25。在嘗試使用不同的SDK工具/構建工具/ Google存儲庫組合近一個半月后,這個問題找到了解決方案。
導航至platforms/android/project.properties
並查找類似於cordova.system.library.2=com.google.android.gms:play-services-gcm:12+
注意最后是12+
。 只需將其更改為11+
,即可完成工作。 希望沒有人像我一樣經歷這個過程。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.