clean Error:Execution failed for task ':app:mockableAndroidJar'. > java.lang.NullPointerException (no error message) in Android Studio 2.2
See original GitHub issueError:
gradle:
··· compileSdkVersion 23 buildToolsVersion “23.0.3” ···
This error comes when using your lib of android-23, and it disappear when using the original android-23.jar.
We know task ':app:mockableAndroidJar'
is experimental in Android Studio 2.1.3, and I close this.
but google makes this stable in Android Stuido 2.2, and I can’t this.
This error comes for some days until today I found this may be result from your lib.
Issue Analytics
- State:
- Created 7 years ago
- Comments:24 (2 by maintainers)
Top Results From Across the Web
java.lang.NullPointerException (no error message)
I've deleted .gradle folder from the project and was able to rebuild it again. N.B: Make a backup, just in case.
Read more >Android Studio: Fix error "java.lang.NullPointerException (no ...
I try to work with old project that hasn't been updated 3 years ago, I got another bulls**t error without any explanation.
Read more >Java.Lang.Nullpointerexception And Execution Failed For Task
The best method for handling this type of error is specific to the application and to reach the end of the main() function...
Read more >Known issues for Android Studio 2.2 and earlier
A bug in preview 5 means that building non-Gradle projects in the IDE is not working well. (Note - this isn't a supported...
Read more >Kotlin Android Studio plugin error when cleaning project
Android Studio 1.4 ... Go to MainActivity.java and click Code > Convert Java File to Kotlin File. ... Error:Execution failed for task ':app:clean'....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another workaround: In your project’s main build.gradle, inside “allprojects”:
I have this issue as well as I’m using a modified android.jar (which has all the hidden API revealed). I don’t use the unit testing and there’s no apparent way to disable it in Android Studio 2.2.2, so I found a workaround for this problem:
-x :app:prepareReleaseUnitTestDependencies -x :app:mockableAndroidJar -x :app:compileReleaseUnitTestSources
Now the unit testing compilation tasks will always be skipped and no errors will be thrown.