Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

求 判断手机系统代码 #2

Open
weiweiForAndroid opened this issue May 24, 2018 · 13 comments
Open

求 判断手机系统代码 #2

weiweiForAndroid opened this issue May 24, 2018 · 13 comments

Comments

@weiweiForAndroid
Copy link

如题。

@comsince
Copy link
Member

这里是集成推送的demo
你要判断什么系统?

@weiweiForAndroid
Copy link
Author

@comsince 判断 meizu miui emui 三个系统

@comsince
Copy link
Member

ups已经帮你判断了这三个厂商,并在其系统上调用其相关的接口

@weiweiForAndroid
Copy link
Author

8.0 系统你们这个判断准确么?

@weiweiForAndroid
Copy link
Author

我没用你们ups 自己集成了这三个厂商的,现在遇到8.0系统上面判断方法出了点问题。想请教一下。

@comsince
Copy link
Member

我们是根据网上公开的方式判断机型

@weiweiForAndroid
Copy link
Author

如果是 下面这种方法的话,8.0 是没有权限读取 build.prop的 。
https://blog.csdn.net/jin_qing/article/details/53087164

@comsince
Copy link
Member

小米有官方的判断方法,魅族也有官方的api方法,华为可能使用了上面的方法

@weiweiForAndroid
Copy link
Author

魅族的api方法公开了么

@comsince
Copy link
Member

MzSystemUtil
里面有isbrandmeizu,你注意看下pushdemo里面的register订阅说明

@weiweiForAndroid
Copy link
Author

MzSystemUtils 这个没有公开方法 isbrandmeizu

@weiweiForAndroid
Copy link
Author

最近检查了很多地方:还是会出现如下异常

05-24 15:31:02.841 28982-29106/com.tr E/Strategy: isBrandMeizu true
05-24 15:31:03.080 28982-29111/com.tr E/SystemReceiver: cloud pushService start
05-24 15:31:03.210 28982-28982/? E/MobUncaughtExceptionHandler: Unable to instantiate receiver push.MeiZuPushReceiver: java.lang.ClassNotFoundException: Didn't find class "push.MeiZuPushReceiver" on path: DexPathList[[zip file "/data/app/com.tr-2/base.apk", zip file "/data/app/com.tr-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.tr-2/lib/arm, /system/fake-libs, /data/app/com.tr-2/base.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_dependencies_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_0_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_1_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_2_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_3_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_4_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_5_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_6_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_7_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_8_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_9_apk.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
java.lang.RuntimeException: Unable to instantiate receiver push.MeiZuPushReceiver: java.lang.ClassNotFoundException: Didn't find class "push.MeiZuPushReceiver" on path: DexPathList[[zip file "/data/app/com.tr-2/base.apk", zip file "/data/app/com.tr-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.tr-2/lib/arm, /system/fake-libs, /data/app/com.tr-2/base.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_dependencies_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_0_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_1_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_2_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_3_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_4_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_5_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_6_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_7_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_8_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_9_apk.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3120)
at android.app.ActivityThread.-wrap18(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6243)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:912)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:802)
Caused by: java.lang.ClassNotFoundException: Didn't find class "push.MeiZuPushReceiver" on path: DexPathList[[zip file "/data/app/com.tr-2/base.apk", zip file "/data/app/com.tr-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.tr-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.tr-2/lib/arm, /system/fake-libs, /data/app/com.tr-2/base.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_dependencies_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_0_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_1_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_2_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_3_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_4_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_5_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_6_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_7_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_8_apk.apk!/lib/armeabi-v7a, /data/app/com.tr-2/split_lib_slice_9_apk.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:3115)
... 8 more

@comsince
Copy link
Member

你是不是用了插件的方式

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants