Reputation: 101
I am publishing an android library module to my server's artifactory service. When I download the aar file and extract the classes.jar file I can see my packages:
drwxrwxr-x 4 yon yon 4096 Jul 28 14:44 .
drwxrwxr-x 3 yon yon 4096 Jul 28 14:44 ..
-rw-rw-r-- 1 yon yon 594 Jul 28 14:18 BuildConfig.class
drwxrwxr-x 2 yon yon 4096 Jul 28 14:44 event
drwxrwxr-x 2 yon yon 4096 Jul 28 14:44 widget
including the java files inside the packages:
drwxrwxr-x 2 yon yon 4096 Jul 28 14:44 .
drwxrwxr-x 4 yon yon 4096 Jul 28 14:44 ..
-rw-rw-r-- 1 yon yon 425 Jul 28 14:18 QRFinishedEvent.class
After configuring the repo settings in my project level build.gradle:
maven {
url "myserver/artifactory/libs-release-local"
credentials {
username = "${artifactory_username}"
password = "${artifactory_password}"
}
}
I can resolve the dependency in my app-level build.gradle:
compile(group: mygroup, name: mypackage, version: '1.0.0', ext: 'aar')
And it downloads successfuly. However in Android Studio I cannot resolve the packages that were present in classes.jar. Only R and BuildConfig seem to be resolvable.
How can this be resolved?
I am using Android Studio 1.5.1 and build tools 23.0.1 for both the aar module and the project depending on it.
Upvotes: 1
Views: 958
Reputation: 101
I fixed the issue by bumping the version of my library in both the build.gradle of the library module and the build.gradle of the app depending on it.
Upvotes: 2