我想編譯一個應用程序利用一個單獨的應用程序作爲依賴項,但是當我從這個庫編譯引用模塊時,我看到幾個「錯誤:包不存在」和「錯誤:無法找到符號類」消息從分級。以下是我的兩個構建文件。當使用單獨的應用程序作爲依賴包時不存在
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
minSdkVersion 11
targetSdkVersion 19
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'AndroidManifest.xml'
exclude 'resources.arsc'
exclude 'classes.dex'
}
}
dependencies {
repositories {
mavenCentral()
}
compile 'com.android.support:support-v4:+'
compile 'com.google.code.gson:gson:2.2.2'
compile 'com.google.android.gms:play-services:+'
compile 'com.actionbarsherlock:actionbarsherlock:[email protected]'
compile 'com.android.support:support-v4:+'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'se.emilsjolander:stickylistheaders:2.+'
compile 'com.googlecode.libphonenumber:libphonenumber:+'
compile files('libs/crashlytics.jar')
compile files('libs/httpclient-4.2.3.jar')
compile files('libs/libphonenumber-5.9.jar')
compile files('libs/mobileservices-0.2.0-javadoc.jar')
compile files('libs/mobileservices-0.2.0.jar')
compile files('libs/stringtotime-1.0.4.jar')
compile files('libs/urbanairship-lib-2.0.2.jar')
compile 'com.github.chrisbanes.actionbarpulltorefresh:extra-abs:+'
compile files('libs/FlurryAnalytics-4.0.0.jar')
compile 'com.squareup.picasso:picasso:2.3.3'
compile project(':wheel')
}
相關gradle這個:
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.1.0"
defaultConfig {
applicationId "kankan.wheel"
minSdkVersion 5
targetSdkVersion 7
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
誰能幫助/經歷過嗎? Android Studio不會突出顯示該課程中的任何問題,並且我可以通過ctrl +點擊查看引用的軟件包,這似乎意味着它已正確設置...
謝謝!
工作很好。非常感謝! – User24231 2014-09-27 17:02:04
@Doge你的意思是'com.android.application'? – 2015-04-17 05:28:23
是的,這是新的插件名稱。當我最初編寫答案時,插件被簡單地命名爲'android' – Doge 2015-04-17 06:38:29