android-hidden-api: clean Error:Execution failed for task ':app:mockableAndroidJar'. > java.lang.NullPointerException (no error message) in Android Studio 2.2
Error:
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.
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 24 (2 by maintainers)
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.