nautilus
nautilus copied to clipboard
Flutter v1.7.8+hotfix.4 报 Didn't find class "android.support.v4.content.ContextCompat"
在基于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.
你用了androidx?
@JarvanMo 我没有针对Androidx特别配置,可能是自动启动了AndroidX
具体我也不清楚。
我使用 Android Studio 打开flutter app的Android功能,然后执行 Migrate to AndroidX 现在工作正常了