我成功地使用最小sdks构建了最多20个项目,但是当我尝试使用以下代码进行构建时:
minSdkVersion 21
targetSdkVersion 21
我收到一个错误:
:project:preDexDebug
no classfiles specified
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':project:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/user/android-sdk-macosx/build-tools/21.1.1/dx -JXmx2g --dex --multi-dex --output /Users/user/Project-Android/project/build/intermediates/pre-dexed/debug/tween-engine-api-sources-a613effab3e9735b093029491b18c5c4872bdf88.jar /Users/user/Project-Android/project/build/intermediates/exploded-aar/android-ui-client.gdxlibrary/android/unspecified/libs/tween-engine-api-sources.jar
Error Code:
1
Output:
no classfiles specified
我在应用程序的某些地方使用libgdx。
然后出现安装对话框,如果我选择设备,则会出现另一个错误:
Target device: genymotion-google_nexus_6___5_0_0___api_21___1440x2560-192.168.56.103:5555
Uploading file
local path: /Users/user/Project-Android/project/build/outputs/apk/project-debug.apk
remote path: /data/local/tmp/com.ui.client.debug
I/O Error: /Users/user/Project-Android/project/build/outputs/apk/project-debug.apk (No such file or directory)
然后出现一个IDE对话框,并显示错误消息:
Failed to complete Gradle execution.
Cause:
(原因后仅留空白)
我有完全一样的问题。使用--debug选项运行gradle后,发现gradle无法处理其中没有类文件的jar文件(* -javadoc.jar)。
从/ libs文件夹中删除文件可解决此问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句