-
Notifications
You must be signed in to change notification settings - Fork 60
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
Comments
看这个问题是线程问题,但是原生代码中并没有使用子线程回调flutter。我使用 flutter 3.7和3.10测试,安卓9/13,都没有复现这个问题。你那边flutter 版本是多少?手机的安卓版本,型号等也提供一下。 |
flutter版本: 2.10.0 |
flutter版本: 2.10.0 ? 建议更新一下 flutter。
flutter版本: 2.10.0 ? 建议更新一下 flutter。 |
楼主我碰到一个闪退,说我缺了什么东西么,不管是相机还是选图片,现在我机子必定闪退。。T T
|
在你的 AndroidManifest.xml 中application 标签下 添加 tools:replace="android:theme"试试
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2023年12月11日(星期一) 上午10:18
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [lisen87/image_pickers] 选择图片闪退,不是必现,但是出现机率很大 (Issue #117)
楼主我碰到一个闪退,说我缺了什么东西么
I/Timeline(30542): Timeline: Activity_launch_request time:961952734 W/ActivityThread(30542): handleWindowVisibility: no activity for token ***@***.*** D/ViewContentFactory(30542): initViewContentFetcherClass I/ContentCatcher(30542): ViewContentFetcher : ViewContentFetcher D/ViewContentFactory(30542): createInterceptor took 0ms D/ForceDarkHelper(30542): updateByCheckExcludeList: pkg: com.yongjiang.airobot activity: ***@***.*** I/chatty (30542): uid=10607(com.yongjiang.airobot) identical 1 line D/ForceDarkHelper(30542): updateByCheckExcludeList: pkg: com.yongjiang.airobot activity: ***@***.*** 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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
报错
|
***@***.***/AppTheme"
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2023年12月11日(星期一) 上午10:40
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [lisen87/image_pickers] 选择图片闪退,不是必现,但是出现机率很大 (Issue #117)
<application android:label="测试" android:name="${applicationName}" tools:replace="android:theme" ***@***.***/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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
确保你有个 theme
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2023年12月11日(星期一) 上午10:40
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [lisen87/image_pickers] 选择图片闪退,不是必现,但是出现机率很大 (Issue #117)
<application android:label="测试" android:name="${applicationName}" tools:replace="android:theme" ***@***.***/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.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
按照楼主的操作了,可以了感谢 |
The text was updated successfully, but these errors were encountered: