rah*_*nia 20 android android-support-library android-gradle-plugin android-api-levels
我的项目工作得非常好,但直到有一天,我将项目上传到github.我不知道这个问题是否与此有关,但今天当我编译我的android studio项目时,它开始向我展示这4个可怕的错误.我已经尝试了大部分谷歌搜索结果但没有帮助!
错误:无法解决:com.android.support:cardview-v7:25.0.0
错误:无法解决:com.android.support:customtabs:25.0.0
错误:无法解决:com.android.support:appcompat- v7:25.0.0
错误:无法解决:com.android.support :support-v4:25.0.0
这是android studio屏幕的屏幕截图,如果它有帮助!
这是我的应用级build.gradle文件:
apply plugin: 'com.android.application'
repositories {
mavenLocal()
mavenCentral()
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.google.firebase.codelab.friendlychat"
minSdkVersion 22
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:23.1.1'
compile 'com.firebase:firebase-client-android:2.5.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:appcompat-v7:23.1.1'
// Google
compile 'com.google.android.gms:play-services-auth:9.4.0'
// Firebase
compile 'com.google.firebase:firebase-database:9.4.0'
compile 'com.google.firebase:firebase-auth:9.4.0'
compile 'com.google.firebase:firebase-config:9.4.0'
compile 'com.google.android.gms:play-services-appinvite:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.firebase:firebase-database:9.2.1'
compile 'com.google.firebase:firebase-messaging:9.2.1'
compile 'com.google.firebase:firebase-crash:9.4.0'
// Firebase UI
compile 'com.firebaseui:firebase-ui-database:0.4.0'
// Testing dependencies
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support:support-annotations:23.4.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
//facebook
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
这是我的项目级build.gradle文件:
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.2'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
为什么我突然开始出现这些错误.
提前致谢!
Yog*_*esh 18
打开你的android SDK管理器(来自C:\ Users\youruseraccount\AppData\Local\Android\sdk)并更新以下版本的最新版本,
工具部分
Android SDK工具
Android SDK平台工具
Android SDK Build工具
Android 7.1.1(API 25)部分
附加部分
然后相应地更新您的gradle文件.
Eli*_*s N 14
Facebook更新了他们的SDK以使用最新的支持库.你可以替换
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
Run Code Online (Sandbox Code Playgroud)
同
compile 'com.facebook.android:facebook-android-sdk:4.16.1'
Run Code Online (Sandbox Code Playgroud)
如果你还不想更新你的android sdk.
| 归档时间: |
|
| 查看次数: |
8171 次 |
| 最近记录: |