是否有可能以Android 28为目标(例如“targetSdkVersion 28”),同时使用appcompat-v7和Firebase?
有没有人设法瞄准安卓28(例如设置为targetsdkVersion28)并使用Firebase?我的build.gradle如下所示:是否有可能以Android 28为目标(例如“targetSdkVersion 28”),同时使用appcompat-v7和Firebase?,android,firebase,android-support-library,android-appcompat,Android,Firebase,Android Support Library,Android Appcompat,有没有人设法瞄准安卓28(例如设置为targetsdkVersion28)并使用Firebase?我的build.gradle如下所示: apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.google.firebase.example.fireeats" minSdkVersion 28
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.google.firebase.example.fireeats"
minSdkVersion 28
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.google.firebase:firebase-core:16.0.3'
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'
}
apply plugin: 'com.google.gms.google-services'
Android Studio警告混合版本:发现了28.0.0-rc02、26.1.0版本。示例包括com.android.support:animated vector drawable:28.0.0-rc02和com.android.support:support media compat:26.1.0
Firebase 16.0.3是否与Android 28支持库不兼容?在撰写本文时,Firebase取决于支持库版本27,因此您确实需要提供显式覆盖。请参阅下面的工作构建文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.google.firebase.example.fireeats"
minSdkVersion 28
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0' // NEED TO ADD
implementation 'com.android.support:support-v4:28.0.0' //NEED TO ADD
implementation 'com.google.firebase:firebase-core:16.0.4'
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'
}
apply plugin: 'com.google.gms.google-services'