Cannot create project using minSdk = 21

I successfully create a project with min sdks to 20, but when I try to build with:

minSdkVersion 21 targetSdkVersion 21 

I get an error message:

 :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 use libgdx in some places of the application.

Then the installation dialog appears, and if I select the 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 the IDE dialog box pops up with an error message:

 Failed to complete Gradle execution. Cause: 

(just an empty space after the reason)

+6
source share
1 answer

I had exactly the same problem. After running gradle with the --debug parameter, it turned out that gradle could not process the jar file without the class files in it (a * -javadoc.jar).

Removing the file from the / libs folder fixed the problem.

+1
source

Source: https://habr.com/ru/post/983266/


All Articles