所以我已经升级了我的facebookConnectPlugin(cordova-plugin-facebook4 / npmjs)以获得iOS支持,而我的iOS版本正在编译 - 但现在我的Android却没有。构建错误说明:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'project'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find com.android.support:support-v4:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/android-sdk/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
Required by:
:project:unspecified > com.facebook.android:facebook-android-sdk:4.10.1
> Could not find com.android.support:cardview-v7:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
https://repo1.maven.org/maven2/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
file:/android-sdk/extras/android/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
file:/android-sdk/extras/android/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
file:/android-sdk/extras/google/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
file:/android-sdk/extras/google/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
Required by:
:project:unspecified > com.facebook.android:facebook-android-sdk:4.10.1
这是在他们issues list的此存储库(22天前开放)中描述的,其中pull request解释了他们的解决方案(2天前)。
我使用的是6.0.0的CLI版本。任何人都可以提出我可以尝试的任何其他建议。
编辑:我只升级到cli 6.0.0,因为我看到它最近发布并认为它可能具有所需的依赖关系 - 我稍后会尝试5.4和5.2。
编辑:对你的问题,杰西;
build.phonegap.com
执行所有操作。答案 0 :(得分:5)
答案 1 :(得分:2)
我也在使用Phonegap Build
显然问题出在phonegap构建而不是插件,因为上面提到的Android支持库还没有更新。
我在插件issues page中找到的解决方案是将插件降级为使用版本1.3.0:
<gap:plugin name="cordova-plugin-facebook4" source="npm" version="1.3.0">
<param name="APP_ID" value="APP_ID" />
<param name="APP_NAME" value="APP_NAME" />
</gap:plugin>
同时排除或注释掉它,因为它会产生另一种类型的编译错误:
<gap:plugin name="cordova-plugin-android-support-v4" gap:platform="android" source="npm" spec="21.0.1" />
这对我有用,现在我的Android构建工作正常。
临时解决方案,直到Phonegap Build更新该库。