Android Studio RC 1 Gradle build won't compile after update
After intensive internet searching, I could not find an answer to my problem. After I upgraded android studio from beta to rc1, gradle build script stopped working with the following error:
Error:String index out of range: -1
My build script looks like this:
apply plugin: 'com.android.application'
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 21
buildToolsVersion '21.1.1'
defaultConfig {
applicationId 'myappidhere'
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName '1.0'
}
lintOptions {
abortOnError false
}
android {
sourceSets {
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java', 'src/main/java-gen']
res.srcDirs = ['src/main/res']
}
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.2'
compile 'com.android.support:support-v4:21.0.2'
compile 'com.android.support:recyclerview-v7:21.0.0'
compile 'com.jakewharton:butterknife:6.0.0'
compile 'com.jakewharton.timber:timber:2.5.0'
compile 'de.greenrobot:greendao:1.3.7'
compile 'com.rengwuxian.materialedittext:library:1.5.0'
//local libs
compile(name: 'utilsaaa1', ext: 'aar')
compile(name: 'pixlui_1_0_5_fork', ext: 'aar')
compile project(':Secure_preferences_lib')
}
After reading the gradle log error, the problematic lines are as follows:
compile(name: 'utilsaaa1', ext: 'aar')
compile(name: 'pixlui_1_0_5_fork', ext: 'aar')
Both files are inside the lib folder. I don't know how to fix this, so any help would be appreciated.
EDIT1: idea.log
Caused by: org.gradle.api.IllegalDependencyNotation: Supplied String module notation 'utilsaaa1' is invalid. Example notations: 'org.gradle:gradle-core:2.2', 'org.mockito:mockito-core:1.9.5:javadoc'.
+3
source to share