首页 > 代码库 > [Android Studio] 取消引用库打包出现异常-- provided dependencies can only be jars
[Android Studio] 取消引用库打包出现异常-- provided dependencies can only be jars
Warning: Project App: provided dependencies can only be jars. com.android.support:appcompat-v7:22.2.0 is an Android Library Warning: Project App: provided dependencies can only be jars. com.android.support:support-v4:22.2.0 is an Android Library.
以上是AndroidStudio报的错,
我的build.gradle
apply plugin: 'com.android.library' android { compileSdkVersion 22 buildToolsVersion "23.0.0 rc2" defaultConfig { minSdkVersion 14 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) provided 'com.android.support:appcompat-v7:22.2.0' provided 'com.android.support:support-v4:22.2.0' }
解决方式:
1.打开项目设置
2.改动gradle版本号
3.完毕又一次编译一下,祝你成功!
[Android Studio] 取消引用库打包出现异常-- provided dependencies can only be jars
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。