我的.android依赖项均未解析。
示例:
未能解决:com.android.support:appcompat-v7:28.1.0在文件中显示在项目结构对话框中显示
未能解决:com.android.support:support-v4:28.10在文件中显示在项目结构对话框中显示
我的gradle版本是4.6,我刚刚更新到最新的android工作室3.2.1版本。
我基于项目的等级如下:
buildscript {
repositories {
jcenter()
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://maven.google.com" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
和我的基于应用程序的渐变文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.example.sanchez.worldgramproject"
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true
versionCode 0
versionName "0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.github.madrapps:pikolo:1.1.6'
implementation 'com.android.support:design:28.1.0'
implementation 'com.firebaseui:firebase-ui-database:4.2.0'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.firebaseui:firebase-ui-storage:2.3.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.android.support:appcompat-v7:28.1.0'
implementation 'com.android.support:cardview-v7:28.1.0'
implementation 'com.android.support:recyclerview-v7:28.1.0'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.6'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.android.support:support-v4:28.1.0'
implementation 'com.android.support:exifinterface:28.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-storage:16.0.4'
}
apply plugin: 'com.google.gms.google-services'
由于版本与buildTool不匹配而更改类似的错误依赖项更改BuildTollVersion
buildToolsVersion '28.1.3'
如果不起作用请更改
com.android.support:appcompat-v7:28.0.0
com.android.support:support-v4:28.0.0
并且你需要将所有28.1…版本更改为28.0…
删除buildToolsVersion '28.0.3'
并将28.0.0
用于所有支持库。