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

选择图片闪退,不是必现,但是出现机率很大 #117

Open
743306400 opened this issue Jun 9, 2023 · 10 comments
Open

选择图片闪退,不是必现,但是出现机率很大 #117

743306400 opened this issue Jun 9, 2023 · 10 comments

Comments

@743306400
Copy link

image
@lisen87
Copy link
Owner

lisen87 commented Jun 10, 2023

看这个问题是线程问题,但是原生代码中并没有使用子线程回调flutter。我使用 flutter 3.7和3.10测试,安卓9/13,都没有复现这个问题。你那边flutter 版本是多少?手机的安卓版本,型号等也提供一下。

@743306400
Copy link
Author

看这个问题是线程问题,但是原生代码中并没有使用子线程回调flutter。我使用 flutter 3.7和3.10测试,安卓9/13,都没有复现这个问题。你那边flutter 版本是多少?手机的安卓版本,型号等也提供一下。

flutter版本: 2.10.0
手机型号: OPPO K5 ColorsOs 版本: V11.1
Android版本: Android 11

@lisen87
Copy link
Owner

lisen87 commented Jun 12, 2023

flutter版本: 2.10.0 ? 建议更新一下 flutter。

看这个问题是线程问题,但是原生代码中并没有使用子线程回调flutter。我使用 flutter 3.7和3.10测试,安卓9/13,都没有复现这个问题。你那边flutter 版本是多少?手机的安卓版本,型号等也提供一下。

flutter版本: 2.10.0 手机型号: OPPO K5 ColorsOs 版本: V11.1 Android版本: Android 11

flutter版本: 2.10.0 ? 建议更新一下 flutter。

@DaYang816
Copy link

DaYang816 commented Dec 11, 2023

楼主我碰到一个闪退,说我缺了什么东西么,不管是相机还是选图片,现在我机子必定闪退。。T T

I/Timeline(30542): Timeline: Activity_launch_request time:961952734
W/ActivityThread(30542): handleWindowVisibility: no activity for token android.os.BinderProxy@42c9e58
D/ViewContentFactory(30542): initViewContentFetcherClass
I/ContentCatcher(30542): ViewContentFetcher : ViewContentFetcher
D/ViewContentFactory(30542): createInterceptor took 0ms
D/ForceDarkHelper(30542): updateByCheckExcludeList: pkg: com.yongjiang.airobot activity: com.leeson.image_pickers.activitys.SelectPicsActivity@ec4e070
I/chatty  (30542): uid=10607(com.yongjiang.airobot) identical 1 line
D/ForceDarkHelper(30542): updateByCheckExcludeList: pkg: com.yongjiang.airobot activity: com.leeson.image_pickers.activitys.SelectPicsActivity@ec4e070
D/AndroidRuntime(30542): Shutting down VM
E/AndroidRuntime(30542): FATAL EXCEPTION: main
E/AndroidRuntime(30542): Process: com.yongjiang.airobot, PID: 30542
E/AndroidRuntime(30542): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yongjiang.airobot/com.leeson.image_pickers.activitys.SelectPicsActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(30542): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3308)
E/AndroidRuntime(30542): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3457)
E/AndroidRuntime(30542): 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
E/AndroidRuntime(30542): 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(30542): 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(30542): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2044)
E/AndroidRuntime(30542): 	at android.os.Handler.dispatchMessage(Handler.java:107)
E/AndroidRuntime(30542): 	at android.os.Looper.loop(Looper.java:224)
E/AndroidRuntime(30542): 	at android.app.ActivityThread.main(ActivityThread.java:7562)
E/AndroidRuntime(30542): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(30542): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
E/AndroidRuntime(30542): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
E/AndroidRuntime(30542): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(30542): 	at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:852)
E/AndroidRuntime(30542): 	at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:815)
E/AndroidRuntime(30542): 	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:703)
E/AndroidRuntime(30542): 	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195)
E/AndroidRuntime(30542): 	at com.leeson.image_pickers.activitys.SelectPicsActivity.onCreate(SelectPicsActivity.java:75)
E/AndroidRuntime(30542): 	at android.app.Activity.performCreate(Activity.java:7893)
E/AndroidRuntime(30542): 	at android.app.Activity.performCreate(Activity.java:7880)
E/AndroidRuntime(30542): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
E/AndroidRuntime(30542): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3283)
E/AndroidRuntime(30542): 	... 11 more
I/Process (30542): Sending signal. PID: 30542 SIG: 9
Lost connection to device.

Exited.

@lisen87
Copy link
Owner

lisen87 commented Dec 11, 2023 via email

@DaYang816
Copy link

    <application
        android:label="测试"
        android:name="${applicationName}"
        tools:replace="android:theme"
        android:icon="@mipmap/ic_launcher">

报错

Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
E:\flutterDemo\ces\android\app\src\main\AndroidManifest.xml:14:5-47:19 Error:
	tools:replace specified at line:14 for attribute android:theme, but no new value specified
E:\flutterDemo\ces\android\app\src\main\AndroidManifest.xml Error:
	Validation failed, exiting

FAILURE: Build failed with an exception.

@lisen87
Copy link
Owner

lisen87 commented Dec 11, 2023 via email

@lisen87
Copy link
Owner

lisen87 commented Dec 11, 2023 via email

@lisen87
Copy link
Owner

lisen87 commented Dec 11, 2023

image

image

@DaYang816
Copy link

按照楼主的操作了,可以了感谢

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

3 participants