添加了百度定位或者是高德定位出现类找不到的问题
添加了百度定位或者是高德定位出现类找不到的问题 . 我本以为百度地图定位API跟环信冲突了 ,然后换高德了 , 还是出现class not found问题 .(我也是醉了) 但我把定位API去除后就没有发现问题了.
下面是我build文件
报错Log:
下面是我build文件
//apply plugin: 'me.tatarka.retrolambda'
//apply plugin: 'android-sdk-manager' //让你的sdk 依赖的东西可以降级 100毫秒build你的项目!!
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.sinohealth.doctor"
minSdkVersion 15
targetSdkVersion 23
versionCode 3
versionName "v1.0.3"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
//classpath 'com.google.guava:guava:17.0'
classpath 'com.google.guava:guava-jdk5:17.0'
// classpath 'me.tatarka:gradle-retrolambda:3.2.3'
// classpath 'com.android.tools.build:gradle:1.3.+'
// classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.+'
}
}
// Required because retrolambda is on maven central
repositories {
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
android {
/*
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
*/
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//compile project(':material')
compile project(':hximlibrary')
compile project(':galleryfinal')
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:23.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.squareup.okio:okio:1.6.0'
// compile 'com.squareup.retrofit:retrofit:2.0.0-beta2'
// compile 'com.squareup.retrofit:converter-jackson:2.0.0-beta2'
// compile 'io.reactivex:rxjava:1.0.10'
//compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.guava:guava:18.0'
compile 'com.android.support:support-v4:23.1.0'
//compile 'com.fasterxml.jackson.core:jackson-databind:2.5.1'
//compile 'com.fasterxml.jackson.core:jackson-core:2.5.1'
//compile 'com.fasterxml.jackson.core:jackson-annotations:2.5.1'
//compile 'com.github.johnpersano:supertoasts:1.3.4@aar' //toast
//compile 'com.github.vajro:MaterialDesignLibrary:1.6' 这个有bug , 兼容到 API 16
//compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:appcompat-v7:23.1.0'
// compile 'com.github.rey5137:material:1.2.1' //导入这个后没有提示
compile 'com.pnikosis:materialish-progress:1.7'
//等待窗 //dialog_medicine_save
compile 'com.flyco.dialog:FlycoDialog_Lib:1.2.2@aar'
//dialog_medicine_save
compile 'com.flyco.animation:FlycoAnimation_Lib:1.0.0@aar'
//也是dialog
compile 'com.nineoldandroids:library:2.4.0'
//tab
compile 'com.ogaclejapan.smarttablayout:library:1.6.0@aar'
//Optional: see how to use the utility.
compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.0@aar'
//tab参考
compile 'de.hdodenhof:circleimageview:2.0.0'
//圆角的view
compile 'de.greenrobot:eventbus:2.4.0'
compile 'com.facebook.rebound:rebound:0.3.8'
//动画效果
// compile 'com.commit451:PhotoView:1.2.4' // 1.2.4找不到一些class 已集成在photoView 下
compile 'me.dm7.barcodescanner:zxing:1.8.3'
//compile 'me.xiaopan:switchbutton:1.2.0'
//compile 'wq.photo:photogallery:2.0.0'//微信相册
// compile 'cn.finalteam:galleryfinal:1.2.0' 用了photoView 又他妈的报错了 , 搞到我用Lib!!
compile 'com.qiniu:qiniu-android-sdk:7.0.+'
//七牛
compile 'com.baoyz.swipemenulistview:library:1.3.0' //左划删除listView
}
报错Log:
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: FATAL EXCEPTION: main
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: Process: com.sinohealth.doctor, PID: 19640
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: java.lang.RuntimeException: Unable to create application com.sinohealth.doctor.AppApplication: java.lang.IllegalStateException: Could not init static class blocks
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4331)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:135)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Looper.loop(Looper.java:136)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5001)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: Caused by: java.lang.IllegalStateException: Could not init static class blocks
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.easemob.chat.InitSmackStaticCode.initStaticCode(Unknown Source)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.easemob.chat.EMChat.init(Unknown Source)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.hximlibrary.controller.HXSDKHelper.onInit(HXSDKHelper.java:189)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.hximlibrary.LibApplication.onCreate(LibApplication.java:59)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.doctor.AppApplication.onCreate(AppApplication.java:16)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:135)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Looper.loop(Looper.java:136)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5001)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: org.jivesoftware.smackx.ServiceDiscoveryManager
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.Class.classForName(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.Class.forName(Class.java:251)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.easemob.chat.InitSmackStaticCode.initStaticCode(Unknown Source)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.easemob.chat.EMChat.init(Unknown Source)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.hximlibrary.controller.HXSDKHelper.onInit(HXSDKHelper.java:189)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.hximlibrary.LibApplication.onCreate(LibApplication.java:59)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.doctor.AppApplication.onCreate(AppApplication.java:16)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:135)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Looper.loop(Looper.java:136)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5001)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: org.jivesoftware.smackx.packet.DiscoverInfo$Identity
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at org.jivesoftware.smackx.ServiceDiscoveryManager.(Unknown Source)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.Class.classForName(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.Class.forName(Class.java:251)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.easemob.chat.InitSmackStaticCode.initStaticCode(Unknown Source)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.easemob.chat.EMChat.init(Unknown Source)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.hximlibrary.controller.HXSDKHelper.onInit(HXSDKHelper.java:189)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.hximlibrary.LibApplication.onCreate(LibApplication.java:59)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.sinohealth.doctor.AppApplication.onCreate(AppApplication.java:16)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4328)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.access$1500(ActivityThread.java:135)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.os.Looper.loop(Looper.java:136)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5001)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
01-05 17:51:33.519 19640-19640/com.sinohealth.doctor E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
EMChat.getInstance().init(context); //调用这行代码就报错了
没有找到相关结果
已邀请:
2 个回复
jansonqiang - 90hou
lzan13 - 慢慢来,一步一个脚印?