I'm struggling to use external library in Android Studio 1.3, Gradle 2.5 and gradle-experimental plugin 0.2.0, required because of NDK.
I found some material here on how to change old gradle files which I've done, but can't find any other documentation documentation.
During my extensive search I managed to find out the changes for manifest but not for res
and aid
. Has anyone managed to find out what need to be changed or any useful documentation?
apply plugin: 'com.android.model.library'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle-experimental:0.2.0'
}
}
model {
android {
compileSdkVersion = 19
buildToolsVersion = "19.1.0"
defaultConfig.with {
applicationId = "org.opencv.android"
minSdkVersion.apiLevel = 8
targetSdkVersion.apiLevel = 19
versionCode = 3000
versionName = "3.0.0"
}
}
android.sources {
main {
manifest.source.include 'AndroidManifest.xml' // OLD manifest.srcFile 'AndroidManifest.xml'
java.source.srcDir 'src'
resources.source.srcDirs 'src'
res.srcDirs = ['res'] // ERROR
aidl.srcDirs ['src'] // ERROR
}
}
}
The errors are:
Gradle sync failed: Could not find property 'srcDirs' on AndroidLanguageSourceSet 'main:aidl'.
Gradle sync failed: Unable to load class 'com.android.build.gradle.model.AndroidLanguageSourceSet_Decorated'.