ERROR: Failed to resolve: com.android.support:appcompat-v7:24.2.1
关于这个错误报告,在网上查找到如下几个方法
1.SDK与构建文件不一致
参考:Failed to resolve:com.android.support:appcompat-v7:报错处理
2.修改repositories
在Gradle Script →build.gradle→allprojects类中修改
allprojects {
repositories {
mavenLocal()
jcenter()
maven { url "https://maven.google.com" }
}
}
Error:A problem occurred configuring project ‘:app’.
1.检查NDK是否安装且配置正确
参考:Android 笔记:Error:A problem occurred configuring project ‘:app’.
2.转到Gradle Script →build.gradle (Module:app)
注释掉testCompile 'junit:junit:4.12
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
/*testCompile 'junit:junit:4.12'*/
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'org.litepal.android:core:1.3.2'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.google.code.gson:gson:2.7'
}