我正在开发一款适用于Marshmallow和Lollipop但在KitKat上崩溃的Android应用。
这是我的项目build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这是我的app build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.moover.moovenda.moover"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.4'
compile 'com.android.support:support-v4:23.4.0'
compile 'io.nlopez.smartlocation:library:3.2.4'
compile 'net.danlew:android.joda:2.9.3.1'
compile 'com.google.android.gms:play-services:9.2.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.gcacace:signature-pad:1.2.0'
compile files('libs/cloudinary-android-1.2.2.jar')
}
apply plugin: 'com.google.gms.google-services'
这是我得到的错误:
09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover I / SELinux:功能:selinux_android_load_priority [0],没有sepolicy文件。
09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover I / SELinux:功能:selinux_android_load_priority [1],没有sepolicy版本文件。
09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover I / SELinux:功能:selinux_android_load_priority,优先级为3.优先级版本为VE = SEPF_SM-G360F_4.4.4_A024
09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover E / SELinux:[DEBUG] get_category:变量seinfocat:默认灵敏度:NULL,cateogry:NULL 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover E / SELinux:seapp_context_lookup:str_security_ctx为null 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover E / dalvikvm:>>>>>普通用户 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover E / dalvikvm:>>>>> com.moover.moovenda.moover [userId:0 | appId:10117] 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover E / SELinux:[DEBUG] get_category:变量seinfocat:默认灵敏度:NULL,cateogry:NULL 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover E / SELinux:seapp_context_lookup:str_security_ctx为null 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover D / dalvikvm:延迟启用CheckJNI 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover I / libpersona:KNOX_SDCARD检查10117 09-20 18:20:00.629 22550-22550 / com.moover.moovenda.moover I / libpersona:KNOX_SDCARD不是角色 09-20 18:20:00.679 22550-22550 / com.moover.moovenda.moover D / TimaKeyStoreProvider:在addTimaSignatureService中 09-20 18:20:00.689 22550-22550 / com.moover.moovenda.moover D / TimaKeyStoreProvider:无法添加TimaSignature服务,许可证检查失败 09-20 18:20:00.689 22550-22550 / com.moover.moovenda.moover D / ActivityThread:添加了TimaKesytore提供商 09-20 18:20:00.719 22550-22550 / com.moover.moovenda.moover D / ActivityThread:handleBindApplication:com.moover.moovenda.moover 09-20 18:20:00.749 22550-22550 / com.moover.moovenda.moover W / dalvikvm:VFY:无法找到签名中引用的类(Lcom / google / firebase / FirebaseOptions;) 09-20 18:20:00.749 22550-22550 / com.moover.moovenda.moover E / dalvikvm:找不到从com.google.firebase.FirebaseApp方法引用的课程“com.google.firebase.FirebaseOptions”。
答案 0 :(得分:0)
感谢VallOn我解决了,我只是从应用程序标记
中的清单中遗漏了这个android:name="android.support.multidex.MultiDexApplication"