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

app crash and exit whit changing ASWV_LAYOUT to 1 in config #301

Open
kia1349 opened this issue Jan 9, 2024 · 2 comments
Open

app crash and exit whit changing ASWV_LAYOUT to 1 in config #301

kia1349 opened this issue Jan 9, 2024 · 2 comments
Labels

Comments

@kia1349
Copy link

kia1349 commented Jan 9, 2024

Describe the bug
when i changed ASWV_LAYOUT to static int ASWV_LAYOUT = 1; then app crashed and exit

Device (please complete the following information):

  • Device name/variant: [Xiaomi Mi 11 ultra]
  • Build [ARM ARMv8]
  • Android Version [android 13]

Additional context
error log:

FATAL EXCEPTION: main
Process: aryaclub.thermosoft.ir, PID: 11706
java.lang.RuntimeException: Unable to start activity ComponentInfo{aryaclub.thermosoft.ir/aryaclub.thermosoft.ir.MainActivity}: java.lang.ClassCastException: aryaclub.thermosoft.ir.MainActivity cannot be cast to com.google.android.material.navigation.NavigationView$OnNavigationItemSelectedListener
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3825)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3971)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2389)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:210)
at android.os.Looper.loop(Looper.java:299)
at android.app.ActivityThread.main(ActivityThread.java:8261)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Caused by: java.lang.ClassCastException: aryaclub.thermosoft.ir.MainActivity cannot be cast to com.google.android.material.navigation.NavigationView$OnNavigationItemSelectedListener
at aryaclub.thermosoft.ir.MainActivity.onCreate(MainActivity.java:194)
at android.app.Activity.performCreate(Activity.java:8516)
at android.app.Activity.performCreate(Activity.java:8480)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1418)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3806)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3971) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2389) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loopOnce(Looper.java:210) 
at android.os.Looper.loop(Looper.java:299) 
at android.app.ActivityThread.main(ActivityThread.java:8261) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954) 

@frogsuite
Copy link

same here

@mgks mgks added the bug label Feb 7, 2025
@mgks
Copy link
Owner

mgks commented Feb 8, 2025

change setNavigationItemSelectedListener from MainActivity to Functions. I have updated the main branch with changes.

navigationView.setNavigationItemSelectedListener(fns);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants