Failed to apply plugin [id 'com.android.internal.application'] - Android studio - Troubleshooting

Last updated February 5, 2022 at 07:21 AM

This troubleshooting resolves the error Failed to apply plugin [id 'com.android.internal.application'] in android studio.

 

We encountered a compilation error after a big update to the gradle tool. In this tutorial dedicated to troubleshooting computer errors we will try to provide the solution that worked (for us anyway) !!

 

[bctt tweet=”Troubleshooting – Failed to apply plugin id 'com.android.internal.application'- Android studio” username=”tedidevblog”]

 

 

Problem

 

While compiling your android application you find the error below:

 

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.

 

If this is your case, the help would be much simpler than it seems.

 

 

Solution

 

To solve this problem just remove the script line below from the file gradle.properties

android.enableUnitTestBinaryResources = true

 

The file gradle.properties is at the root of your project. It is difficult to miss it.

 

 

Last updated February 5, 2022 at 07:21 AM

 

Conclusion

 

You may be interested in Cannot import. Please try again - Playstore console - Troubleshooting et 16 biggest and most famous mysteries the world has forgotten have been solved.

 

Troubleshooting - Failed to apply plugin [id 'com.android.internal.application'] - Android studio