After update Android Studio from 4.1.3 to version 4.2.1 SharedPrefs_ always null

Author: DenisFedak84Created May 21, 2021Updated Mar 31, 2022

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

Source: androidannotations/androidannotations