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

Flutter v1.7.8+hotfix.4 报 Didn't find class "android.support.v4.content.ContextCompat" #23

Open
danieldai opened this issue Aug 28, 2019 · 4 comments

Comments

@danieldai
Copy link

在基于Flutter v1.7.8+hotfix.4的Android app 中使用此插件报如下错误:

W/AppMonitor(30945): load ut_c_api.so failed
W/LoginSDK(30945): ************************************
W/LoginSDK(30945): Debug is enabled, make sure to turn it off in the production environment
W/LoginSDK(30945): ************************************
I/mtopsdk.SDKConfig(30945): [setGlobalAppVersion]set appVersion=3.1.1.210
D/mtopsdk.Mtop(30945): [init] ttid=null
I/mtopsdk.MtopSDK(30945): [init]ttid=null
W/SharedPreferencesImpl(30945): getSharedPreferences
W/SharedPreferencesImpl(30945): org.xmlpull.v1.XmlPullParserException: Unexpected end of document
W/SharedPreferencesImpl(30945): at com.android.internal.util.XmlUtils.readValueXml(XmlUtils.java:1408)
W/SharedPreferencesImpl(30945): at com.android.internal.util.XmlUtils.readMapXml(XmlUtils.java:740)
W/SharedPreferencesImpl(30945): at android.app.SharedPreferencesImpl.loadFromDisk(SharedPreferencesImpl.java:166)
W/SharedPreferencesImpl(30945): at android.app.SharedPreferencesImpl.-wrap1(Unknown Source:0)
W/SharedPreferencesImpl(30945): at android.app.SharedPreferencesImpl$1.run(SharedPreferencesImpl.java:136)
I/mtopsdk.MtopSDK(30945): [init]MtopSDK init Called
I/mtopsdk.MtopSDK(30945): [executeInitCoreTask]MtopSDK initcore start. ttid=null
D/mtopsdk.AsyncServiceBinder(30945): [asyncBind]try to bind service for a
W/mtopsdk.AsyncServiceBinder(30945): [asyncBind]service framework not exist. use intent to bind service.
D/mtopsdk.AsyncServiceBinder(30945): [asyncBind]bindService ret=false
D/mtopsdk.SecuritySignImpl(30945): [init]SecuritySignImpl ISign init.set GlobalAppKey=27827092
D/mtopsdk.SecuritySignImpl(30945): [init]SecuritySignImpl ISign init succeed.init time=1
I/mtopsdk.XState(30945): [setValue]Attention :User XState Local Mode: key:appKey value:27827092
I/mtopsdk.MtopSDK(30945): [executeInitCoreTask]MtopSDK initcore end
I/mtopsdk.MtopSDK(30945): [executeInitExtraTask]MtopSDK initextra start
I/mtopsdk.MtopSDK(30945): [executeInitExtraTask]MtopSDK initextra end
E/AuthSDK_kernel(30945): timeStamp=1566912868000
E/AuthSDK_kernel(30945): time =2019-08-28 09:58:27 216
D/AuthSDK_(30945): sdk version = 1.4.3
D/AuthSDK_(30945): time =2019-08-28 09:58:27 219
E/AuthSDK_(30945): utdid = WMaJZJcFmD8DAAF0YR0d/dw6
E/AuthSDK_(30945): time =2019-08-28 09:58:27 223
D/AuthSDK_kernel(30945): registerRpc
D/AuthSDK_kernel(30945): time =2019-08-28 09:58:27 228
D/mtopsdk.TBSdkLog(30945): [setTLogEnabled] tLogEnabled=false
D/mtopsdk.TBSdkLog(30945): [setPrintLog] printLog=true
I/mtopsdk.SDKConfig(30945): [setGlobalAppVersion]set appVersion=1.0.0
D/AuthSDK_kernel(30945): registerStorage
D/AuthSDK_kernel(30945): time =2019-08-28 09:58:27 235
D/AuthSDK_kernel(30945): registerUserTrack
D/AuthSDK_kernel(30945): time =2019-08-28 09:58:27 240
E/AndroidRuntime(30945): FATAL EXCEPTION: SDK Looper Thread
E/AndroidRuntime(30945): Process: com.mianjiajia.smile_weather, PID: 30945
E/AndroidRuntime(30945): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat;
E/AndroidRuntime(30945): at com.alimama.tunion.utils.TUnionPhoneInfoUtils.(TUnionPhoneInfoUtils.java:154)
E/AndroidRuntime(30945): at com.alimama.tunion.utils.TUnionPhoneInfoUtils.getInstance(TUnionPhoneInfoUtils.java:48)
E/AndroidRuntime(30945): at com.alimama.tunion.trade.net.TUnionNetworkRequest.a(TUnionNetworkRequest.java:76)
E/AndroidRuntime(30945): at com.alimama.tunion.trade.net.TUnionNetworkRequest.createABTestRequest(TUnionNetworkRequest.java:113)
E/AndroidRuntime(30945): at com.alimama.tunion.trade.abtest.TUnionABTestService.a(TUnionABTestService.java:184)
E/AndroidRuntime(30945): at com.alimama.tunion.trade.abtest.TUnionABTestService.b(TUnionABTestService.java:238)
E/AndroidRuntime(30945): at com.alimama.tunion.trade.abtest.TUnionABTestService.startInitialFetch(TUnionABTestService.java:244)
E/AndroidRuntime(30945): at com.alimama.tunion.trade.TUnionTradeSDK.register(TUnionTradeSDK.java:151)
E/AndroidRuntime(30945): at com.alibaba.baichuan.trade.biz.core.taoke.AlibcAidCompoment.init(Unknown Source:34)
E/AndroidRuntime(30945): at com.alibaba.baichuan.trade.biz.AlibcMiniTradeBiz.init(Unknown Source:73)
E/AndroidRuntime(30945): at com.alibaba.baichuan.trade.biz.AlibcTradeBiz.init(Unknown Source:26)
E/AndroidRuntime(30945): at com.alibaba.baichuan.android.trade.AlibcTradeSDK.b(Unknown Source:3)
E/AndroidRuntime(30945): at com.alibaba.baichuan.android.trade.AlibcTradeSDK.a(Unknown Source:0)
E/AndroidRuntime(30945): at com.alibaba.baichuan.android.trade.f.run(Unknown Source:4)
E/AndroidRuntime(30945): at android.os.Handler.handleCallback(Handler.java:808)
E/AndroidRuntime(30945): at android.os.Handler.dispatchMessage(Handler.java:101)
E/AndroidRuntime(30945): at android.os.Looper.loop(Looper.java:166)
E/AndroidRuntime(30945): at android.os.HandlerThread.run(HandlerThread.java:65)
E/AndroidRuntime(30945): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.ContextCompat" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.mianjiajia.smile_weather-VNZjxvIBdH8F-EZkXEBODA==/base.apk"],nativeLibraryDirectories=[/data/app/com.mianjiajia.smile_weather-VNZjxvIBdH8F-EZkXEBODA==/lib/arm64, /data/app/com.mianjiajia.smile_weather-VNZjxvIBdH8F-EZkXEBODA==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]]
E/AndroidRuntime(30945): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
E/AndroidRuntime(30945): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
E/AndroidRuntime(30945): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime(30945): ... 18 more
D/AuthSDK_kernel(30945): register login service
D/AuthSDK_kernel(30945): time =2019-08-28 09:58:27 295
D/AuthSDK_Member.LoginLifecycleAdapter(30945): LoginLifecycle init
D/AuthSDK_Member.LoginLifecycleAdapter(30945): time =2019-08-28 09:58:27 299
D/AuthSDK_kernel(30945): register account link service
D/AuthSDK_kernel(30945): time =2019-08-28 09:58:27 312
D/AuthSDK_Member.AccountLinkLifecycleAdapter(30945): AccountLinkLifecycleAdapter init
D/AuthSDK_Member.AccountLinkLifecycleAdapter(30945): time =2019-08-28 09:58:27 316
D/AuthSDK_syncRun(30945): INIT SUCCESS
D/AuthSDK_syncRun(30945): time =2019-08-28 09:58:27 321
D/AuthSDK_asyncRun(30945): SUCCESS
D/AuthSDK_asyncRun(30945): time =2019-08-28 09:58:27 325
I/Process (30945): Sending signal. PID: 30945 SIG: 9
Lost connection to device.

@JarvanMo
Copy link
Member

你用了androidx?

@danieldai
Copy link
Author

@JarvanMo 我没有针对Androidx特别配置,可能是自动启动了AndroidX

@JarvanMo
Copy link
Member

具体我也不清楚。

@danieldai
Copy link
Author

我使用 Android Studio 打开flutter app的Android功能,然后执行 Migrate to AndroidX 现在工作正常了

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