You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to start activity ComponentInfo{com.app.optibiz/com.sample.edgedetection.scan.ScanActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity
#188
Open
MSatyam-Mishra opened this issue
Nov 28, 2024
· 0 comments
Shutting down VM
E/AndroidRuntime(23268): FATAL EXCEPTION: main
E/AndroidRuntime(23268): Process: com.app.optibiz, PID: 23268
E/AndroidRuntime(23268): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.optibiz/com.sample.edgedetection.scan.ScanActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(23268): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3991)
E/AndroidRuntime(23268): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4144)
E/AndroidRuntime(23268): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
E/AndroidRuntime(23268): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
E/AndroidRuntime(23268): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:99)
E/AndroidRuntime(23268): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2589)
E/AndroidRuntime(23268): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(23268): at android.os.Looper.loopOnce(Looper.java:224)
E/AndroidRuntime(23268): at android.os.Looper.loop(Looper.java:318)
E/AndroidRuntime(23268): at android.app.ActivityThread.main(ActivityThread.java:8790)
E/AndroidRuntime(23268): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(23268): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
E/AndroidRuntime(23268): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
E/AndroidRuntime(23268): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(23268): at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:926)
E/AndroidRuntime(23268): at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:889)
E/AndroidRuntime(23268): at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:772)
E/AndroidRuntime(23268): at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:197)
E/AndroidRuntime(23268): at com.sample.edgedetection.base.BaseActivity.onCreate(BaseActivity.kt:16)
E/AndroidRuntime(23268): at android.app.Activity.performCreate(Activity.java:8891)
E/AndroidRuntime(23268): at android.app.Activity.performCreate(Activity.java:8856)
E/AndroidRuntime(23268): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1471)
E/AndroidRuntime(23268): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3973)
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
<style name="LightTheme" parent="Theme.AppCompat.Light">
<!-- Customize the theme if needed -->
<!-- For example, set the primary color -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
The text was updated successfully, but these errors were encountered:
Androidmanifest.xml
Styles.xml
The text was updated successfully, but these errors were encountered: