Reputation: 47068
I have an Android Library that I've uploaded to Artifactory and include in a separate application using
compile 'com:mycompany:mylibrary:0.0.1'
The gradle syncs properly and imports the library to my 'External Libraries', however when I run the application I get errors referencing code in the library:
// Code in my android library dependency
AUTHORITY = getContext().getString(R.string.content_provider_authority);
^ error: package R does not exist
If anyone has ideas on what's going on please let me know.
Upvotes: 1
Views: 76
Reputation: 47068
Turns out I needed a .aar file not a .jar file for android library dependency. The .aar file is a zip file which contains everything you need for your android library.
Upvotes: 1
Reputation: 9
private static final String AUTHORITY = "your_package"
Upvotes: 0