You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Got Immutables to work on Android Studio v0.8.6. I was unable to reproduce the exact same exception, but a lot of similar problems were encountered and fixed.
Use newly released version of Immutables 0.18 or higher
Fixes were made to generate classes in default package etc
Change to JavaVersion.VERSION_1_7. Currently Immutables processor require java 7
Add artifact for annotations that are missing in Android SDK
compile 'javax.annotation:jsr250-api:1.0'
Generated classes should be added to source folders. Here I might consult projects that may have solved how to do this:
It is difficult to make general statement about Android/studio support, but I was able to see the successful compilation of generated classes in Android studio. I hope this helps if you try it!
P.S. If you looking for something like @ExcludeAnnotation, Immutables has @GenerateAuxiliary
I'm trying to use Immutables for Android Project. But it crashes with NPE during compilation. Steps to reproduce:
1) Create new Android Project in Android Studio 0.8.8 (with default parameters)
2) Add to build.gradle
3) Add dummy data class:
4) Click Run
Expected Behaviour: Successful compilation
Actual Result: NullPointerException during compilation:
Environment: Android Studio 0.8.8, OS X 10.9.4, Java 7 (1.7.0_60)
Do you support Android? Any ideas how to fix this error?
The text was updated successfully, but these errors were encountered: