aar support in Android.mk.. the apk contain no R.java which packageName is aar -


i doing android custom rom development. app need aar , reference aar support in android.mk , edit android.mk use 'mm -b' build app successfully.

but force close when run apk, packagename com.demo.android. caused by: java.lang.classnotfoundexception: didn't find class "com.demo.aar.r"

"com.demo.aar" packagename aar/library.

"com.demo.android" packagename app.

i use aar on androidstudio 1.5, demo app run successfully.

then compare apk between android-studio , android.mk.

finally, find apk built android.mk has no 'com.demo.aar.r' class, apk built androidstudio has. (they both has 'com.demo.android.r' class.)

so bug of android.mk , or need more config in android.mk??

the solution use: local_aapt_flags += --extra-packages {aar package name}. 2 r file. has content. one's package main package, other aar package.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -