Closed mycold closed 7 years ago
@mycold 应用打包后会按cpu类型分包,选择和你的机型对应的包试试看
在module的build.gradle文件添加如下设置: android { //过滤掉不支持的平台 packagingOptions { exclude "lib/arm64-v8a/librealm-jni.so" exclude "lib/mips/librealm-jni.so" exclude "lib/x86/librealm-jni.so" exclude "lib/x86_64/librealm-jni.so" }
splits {
abi {
enable true
reset()
include 'armeabi', 'armeabi-v7a'
}
}
} 参考这个http://www.jianshu.com/p/73ce9b69050a解决了
还有一个问题想请教一下,如果我想拿到服务器返回的code码,比如说200,408之类的,单独处理怎么做呢
@mycold 如果需要对返回码做统一处理,在RxUtil中把code传入ApiException
,然后在CommonSubscriber里取code做处理
如果是某个请求需要单独对返回码做特殊处理,那么就不需要用RxUtil
里的handleResult
做包装了,直接在Presenter
层取原始数据中的code做对应处理就可以了
美女图片下载到本地相册里面,相册里没有,看了一下是不是图片下载的路径不对
@mycold 测试了一下的确有问题,已修复
java.lang.RuntimeException: Unable to create application com.codeest.geeknews.app.App: com.getkeepsafe.relinker.MissingLibraryException: lib/armeabi/librealm-jni.so
FATAL EXCEPTION: main Process: com.codeest.geeknews, PID: 24176 java.lang.RuntimeException: Unable to create application com.codeest.geeknews.app.App: com.getkeepsafe.relinker.MissingLibraryException: lib/armeabi/librealm-jni.so at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4957) at android.app.ActivityThread.access$1600(ActivityThread.java:169) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:171) at android.app.ActivityThread.main(ActivityThread.java:5681) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) Caused by: com.getkeepsafe.relinker.MissingLibraryException: lib/armeabi/librealm-jni.so at com.getkeepsafe.relinker.ApkLibraryInstaller.installLibrary(ApkLibraryInstaller.java:85) at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:180) at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136) at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70) at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:57) at io.realm.internal.RealmCore.loadLibrary(RealmCore.java:60) at io.realm.Realm.init(Realm.java:189) at com.codeest.geeknews.app.App.onCreate(App.java:55) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4954) at android.app.ActivityThread.access$1600(ActivityThread.java:169) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1480) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:171) at android.app.ActivityThread.main(ActivityThread.java:5681) at java.lang.reflect.Method.invoke(Native Method)