我将一个模块导入了我的项目中。当我重建项目时,Android Studio提示错误,警告:依赖的Lib:unspecified 在app项目上解析为不支持编译依赖项的APK归档文件。我搜索并更改了应用插件:
这是我的Gradle代码:
'com.android.application'
为apply plugin: 'com.android.library'
并且从defaultConfig中删除了ApplicationId, 但我仍然收到相同的错误信息:"Warning:Dependency Lib:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency."
有谁可以帮助我吗?这是我的Gradle代码:
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
minSdkVersion 12
targetSdkVersion 23
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile project(':DimenLib')
}
apply plugin:'com.android.application'
,否则,如果它是“模块”,则gradle应具有apply plugin:'com.android.library'
。 - pRaNaY