3
經過在互聯網上的密集搜索後,我無法找到任何問題的答案。之後,我從公測到RC1升級Android Studio中,將gradle這個構建腳本停止並出現以下錯誤工作:Android Studio RC 1 Gradle build不會在更新後編譯
Error:String index out of range: -1
我的構建腳本如下:
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')
}
閱讀gradle這個日誌錯誤後,有問題的行如下:
compile(name: 'utilsaaa1', ext: 'aar')
compile(name: 'pixlui_1_0_5_fork', ext: 'aar')
這兩個文件都在文件夾庫中。 我不知道如何解決這個問題,所以任何幫助將不勝感激。
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'.
是的,這是對我的作品,感謝了很多! – 2015-01-16 15:32:39