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
{{ message }}
This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
Annotated code: @eApplication
public class XXXXX extends SharedApplication {
..... @PREF
SharedPrefs_ sharedPrefs;
....
}
Expected generated code:
sharedPrefs should be created
Actual generated code:
sharedPrefs null
Stacktrace in case of AA crash:
java.lang.RuntimeException: Unable to create application xxx.xxx.xxx.xxxApplication_: java.lang.NullPointerException: Attempt to invoke virtual method 'xxx.xxx.xxx.xxx.SharedPrefs_$SharedPrefsEditor_ xxx.xxx.xxx.xxx.SharedPrefs_.edit()' on a null object reference
**Android gradle plagin version 4.1.0
** Gradle version 6.5
The text was updated successfully, but these errors were encountered:
The null is due to kapt won't be able to generate the necessary classes. I believe Gradle is also a part of the problem.
After messing around with various combination of those in Android Studio 4.2.1, I find that:
AA 4.5.2 only work up to Gradle 4.8.1 and Android Gradle plugin 3.2.1.
AA 4.8.0 only work up to Gradle 6.5 and Android Gradle plugin 4.1.0.
So for the latest Gradle 6.7.1 and Android Gradle plugin 4.2.1, it is still failing to generate the code.
@vxhviet it sounds like the library is deprecated because it cannot support the latest gradle versions, is it true?
Also, should we consider migrating to something else?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
AndroidAnnotations version: 4.8.0
Android compile SDK version:29
Annotated code:
@eApplication
public class XXXXX extends SharedApplication {
.....
@PREF
SharedPrefs_ sharedPrefs;
....
}
Expected generated code:
sharedPrefs should be created
Actual generated code:
sharedPrefs null
Stacktrace in case of AA crash:
java.lang.RuntimeException: Unable to create application xxx.xxx.xxx.xxxApplication_: java.lang.NullPointerException: Attempt to invoke virtual method 'xxx.xxx.xxx.xxx.SharedPrefs_$SharedPrefsEditor_ xxx.xxx.xxx.xxx.SharedPrefs_.edit()' on a null object reference
**Android gradle plagin version 4.1.0
** Gradle version 6.5
The text was updated successfully, but these errors were encountered: