android中Android Studio Error:Dependency报错解决方案
2016-07-15 15:20
537 查看
今天 使用 studio直接导入 一个项目作为 module,但是报了一个错:
Error:Dependency xxxxx:yyyyyyyI:unspecified on project app resolves to an APK archive which is not
通过 对比 主项目和 导入项目,解决了
导入项目
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
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.2.0'
}
Error:Dependency xxxxx:yyyyyyyI:unspecified on project app resolves to an APK archive which is not
通过 对比 主项目和 导入项目,解决了
apply plugin: 'com.android.application'//-------注意 android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.demo.xxx"//-------注意 minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" multiDexEnabled true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } repositories { flatDir { dirs 'libs' } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile project(':moduleName')//-------注意 }
导入项目
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
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.2.0'
}
相关文章推荐
- android developer tiny share-20160715
- Android如何愉快的使用Spinner列表选择框
- Android 如何让EditText不自动获取焦点
- Android自定义View(一)
- Android Studio五分钟带你从菜鸟到高级调试
- AndroidLruCache类
- Android EditText 的使用
- Android属性动画源代码解析(超详细)
- android学习16#--学习canvas.drawText
- android studio Error:(1, 1) 错误: 非法字符: '\ufeff' 解决方案
- MTK_android升级包的制作
- 怎样在Android Studio中导入Module
- 【框架】Android Studio 构造属于自己的框架
- Android学习之路------广播的注册方式
- 腾讯优测| 让Android屏幕适配开发更简单-Google百分比布
- windows android studio 编译Jni动态库
- AsyncTask的使用和源码分析
- Ubuntu系统下android开发环境配置
- Android 应用的数据库
- 关于listview中添加倒计时功能卡顿问题