I'm building an Android library for music streaming. It has ExoPlayer as dependency (excellent library btw!).
We use this library for another project that we're also developing right now, in Xamarin. Currently, we need to add both libraries (my .aar and a .jar for ExoPlayer). That's a bit annoying to be honest, I'd love to just drop my .aar in, and go.
So two questions:
And here's my current gradle file. Nothing exciting to look at though. But as I converted the initial app to a lib, maybe there's something odd, who knows...
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 19
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile ('com.google.android.exoplayer:exoplayer:r1.5.6')
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
compile 'com.android.support:appcompat-v7:23.2.0'
}
There are no solutions for this until this issue is solved, but a viable alternative for someone can be to bundle the .aar
(s) singularly using the "Import .JAR/.AAR Package" while clicking on "New Module".
The only problem with this approach is that you can bundle only 1 AAR at a time in this way, so you need to create a module for each one of them.
In alternative you can try with Kezong fat aar library:
https://github.com/kezong/fat-aar-android
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.