Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/347.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法使用phonegap插件推送、cordova插件crosswalk webview和cordova插件运行状况进行cordova android构建_Java_Android_Cordova_Android Gradle Plugin_Crosswalk Runtime - Fatal编程技术网

Java 无法使用phonegap插件推送、cordova插件crosswalk webview和cordova插件运行状况进行cordova android构建

Java 无法使用phonegap插件推送、cordova插件crosswalk webview和cordova插件运行状况进行cordova android构建,java,android,cordova,android-gradle-plugin,crosswalk-runtime,Java,Android,Cordova,Android Gradle Plugin,Crosswalk Runtime,操作系统:OSX 10.11 cordova:5.4.1(也在6.0上试用) 节点:4.2.6 使用的cordova插件:crosswalk项目/cordova插件crosswalk webview(1.5)、phonegap/phonegap插件推送(1.5.3)和dariosalvi78/cordova插件健康(0.5.3) 运行cordova build android时,我收到以下错误 出了什么问题:行政长官 任务“:dexArmv7Debug”的启用失败。 com.android.i

操作系统:OSX 10.11 cordova:5.4.1(也在6.0上试用) 节点:4.2.6 使用的cordova插件:crosswalk项目/cordova插件crosswalk webview(1.5)、phonegap/phonegap插件推送(1.5.3)和dariosalvi78/cordova插件健康(0.5.3)

运行
cordova build android
时,我收到以下错误

  • 出了什么问题:行政长官 任务“:dexArmv7Debug”的启用失败。 com.android.ide.common.internal.LoggedErrorException:无法运行命令: /usr/local/ceral/android sdk/24.4.1_1/build-tools/23.0.2/dx--dex--no-optimize--output/Users/simon/projects/SproutMobile/platforms/android/build/intermediates/dex/armv7/debug--input list=/Users/simon/projects/SproutMobile/platforms/android/build/intermediates/tmp/dex/armv7/inputList.txt 错误代码: 2. 输出:
*

从platforms/android/build.gradle手动将建议的修复程序应用到platforms/android/build.gradle没有改变任何内容


非常感谢您的帮助

在使用phonegap/cordova构建之后,我遇到了类似的问题: com.android.dex.DexException:多个dex文件定义Lcom/google/android/gms/internal/zzsk

如果您有两个库应该具有完全相同的版本和不同的版本号,请检查build.gradle(Android模块)。在我的例子中,是play services gms:8.4.0和play services location:9.2.1

这是我更新的build.gradle:

dependencies{
....
//make sure are both same version (8.4.0 or 9.2.1 in my case)
compile 'com.google.android.gms:play-services-gcm:9.2.1'
// this is the one I changed:  compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-location:9.2.1' // it was 8.4.0
....
}

在使用phonegap/cordova构建之后,我遇到了类似的问题: com.android.dex.DexException:多个dex文件定义Lcom/google/android/gms/internal/zzsk

如果您有两个库应该具有完全相同的版本和不同的版本号,请检查build.gradle(Android模块)。在我的例子中,是play services gms:8.4.0和play services location:9.2.1

这是我更新的build.gradle:

dependencies{
....
//make sure are both same version (8.4.0 or 9.2.1 in my case)
compile 'com.google.android.gms:play-services-gcm:9.2.1'
// this is the one I changed:  compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.android.gms:play-services-location:9.2.1' // it was 8.4.0
....
}