我最近在我的应用程序中添加了最新的谷歌分析 9.0.0。该应用程序在较新的 android 手机上运行良好,但是当我尝试在较旧的 android 设备上运行它时,我遇到了这个错误(我没有在我的应用程序的任何部分使用 firebase auth):
05-31 11:50:33.466 5326-5326/xxxxxxxxxxxxxxx E/dalvikvm: Could not find class 'com.google.firebase.FirebaseOptions', referenced from method com.google.firebase.FirebaseApp.
05-31 11:50:33.476 5326-5326/xxxxxxxxxxxxxxx E/dalvikvm: Could not find class 'com.google.firebase.FirebaseApp$zzb', referenced from method com.google.firebase.FirebaseApp.zzaJ
以下是我的gradle文件
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "xx.xxxxxxxxxx.xx"
minSdkVersion 16
targetSdkVersion 23
versionCode 4
versionName "1.0.3"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':volley')
compile 'com.google.android.gms:play-services-analytics:9.0.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
compile 'com.android.support:design:23.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.lorentzos.swipecards:library:1.0.9@aar'
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-identity:9.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.wang.avi:library:1.0.1'
compile 'com.nineoldandroids:library:2.4.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'me.alexrs:wave-drawable:1.0.0@aar'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'org.apache.httpcomponents:httpmime:4.5'
compile 'com.github.aakira:expandable-layout:1.5.1@aar'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
transitive = true;
}
}