Q 一些jar包提示
Failed to resolve: com.squareup.retrofit:retrofit:1.9.0
Failed to resolve: com.squareup.okhttp:2.2.0
The problem was fixed by creating a higher level build.gradle file and moved the following code into it
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.2'
}
}
allprojects {
repositories {
jcenter()
}
}
Q:Failed to resolve:某个aar包
A:设置gradle属性
repositories {
//let gradle find aar in The libs directory instead of declared repository.
flatDir {
dirs 'libs'
}
}
Q:merage清单文件时报错
A:在工程清单文件中配置替代 icon name lable 等
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany.myapp"
xmlns:tools="http://schemas.android.com/tools">
<application
android:label="@string/app_name"
tools:replace="android:icon, android:name,android:theme"/>
</manifest>
网友评论