I am working on an AOSP project where I need to use a .aar library with the res folder. I have added .aar reference in Android.mk file but getting below error while opening the app.
java.lang.NoSuchFieldError: No static field activity of type I in class Lcom/sample/voice/R$layout;
Android.mk
LOCAL_STATIC_JAVA_AAR_LIBRARIES += voice
LOCAL_AAPT_FLAGS += --extra-packages com.sample.voice
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES += voice:libs/voice.aar
Tried many solutions but don't know how to include the res file in the Android.mk. But this is working in android studio.