architecture-samples icon indicating copy to clipboard operation
architecture-samples copied to clipboard

Can't build/debug - "Failed to apply plugin [id 'com.android.internal.application']"

Open baalimago opened this issue 5 years ago • 4 comments

Hello!

I have the most recent version of android studio, of the project (on master branch), of kotlin, gradle and windows 10. Still can't build.

This is what it says:

Build file 'C:\Users\<user>\AndroidStudioProjects\architecture-samples\app\build.gradle' line: 1

A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.application']
   > The option 'android.enableUnitTestBinaryResources' is deprecated.
     The current default is 'false'.
     It has been removed from the current version of the Android Gradle plugin.
     The raw resource for unit test functionality is removed.

I've basically only cloned it and now attempted to start it on my OnePlus 8. What am I doing wrong?

/ Lorentz

baalimago avatar Dec 28 '20 10:12 baalimago

Fixed it locally by setting android.enableUnitTestBinaryResources=false in gradle.properties, for anyone else who runs into the issue.

baalimago avatar Dec 28 '20 10:12 baalimago

for my case it was android.enableBuildCache=true, its is removed from gradle version 7, just comment or remove #android.enableBuildCache=true

rohitsharma181589 avatar Aug 20 '21 08:08 rohitsharma181589

There is no need in newer version of Android for enableUnitTestBinaryResources in the file since it has been deprecated and is set to false by default.

Simply go to the gradle.properties file and remove this line entirely and your app should compile. android.enableUnitTestBinaryResources=true

mhmdcs avatar Nov 30 '21 06:11 mhmdcs

Fixed it locally by setting android.enableUnitTestBinaryResources=false in gradle.properties, for anyone else who runs into the issue.

Not worked dude jsjsj

Siu03 avatar Dec 13 '22 02:12 Siu03