Reputation: 742
First time i build an aar module. I am able to convert my app into an aar module. And i create another new app, and add this aar file into the project. However, I encountered this error.
Error:(9) No resource identifier found for attribute 'civ_border_color' in package 'com.example.com'
I have searched for the answer, and recommendation like replacing xmlns:app="http://schemas.android.com/apk/res-auto" with xmlns:app="http://schemas.android.com/apk/lib-auto" or xmlns:app="http://schemas.android.com/apk/com.example.com"
I have tried. And i notice the files that have error, are auto generate files, i am not suppose to change them. Is there any steps that i have missed out creating the aar file. BTW, the compilation of the aar file is successful. Any useful information that i missed out , please do point out. Not vote down. Coz i really have no idea what I have missed out. Thanks.
Upvotes: 1
Views: 358
Reputation: 564
Did you add
repositories {
flatDir {
dirs 'libs'
}
}
in your project's build.gradle?
Did you add
compile(name: 'xxx', ext: 'aar')。
in your module's build.gradle?
Upvotes: 1
Reputation: 742
I found the answer. To give a hand for anyone that facing this issue. When building your aar module. Make sure the layout is change from
xmlns:app="http://schemas.android.com/apk/res-auto"
to
xmlns:app="http://schemas.android.com/apk/lib-auto"
Compile the module, and then add this module to a new project. (The issue solved, I am now encounter different error now, gonna post another question.) Thanks.
Upvotes: 0