I'm succesfully building the project with min sdks up to 20, but when i try to build with:
minSdkVersion 21
targetSdkVersion 21
I get an error:
: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
I'm using libgdx in some places of the app.
Then the install dialog apears and if I choose a device I get another error:
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)
And then an IDE dialog apears with error message:
Failed to complete Gradle execution.
Cause:
(just empty space after cause)
I had exactly the same problem. After running gradle with --debug option it turned out that gradle failed to process a jar file with no class files in it (a *-javadoc.jar).
Removing the file from /libs folder fixed the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With