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

android.view.InflateException crash #901

Open
licaon-kter opened this issue Aug 9, 2022 · 0 comments
Open

android.view.InflateException crash #901

licaon-kter opened this issue Aug 9, 2022 · 0 comments

Comments

@licaon-kter
Copy link

Built 2816ac2 AOSP11

Press Back at the App Permissions screen (did not grant anything), go to menu - Settings, crash:

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.asksven.betterbatterystats/com.asksven.betterbatterystats.PreferencesFragmentActivity}: android.view.InflateException: Binary XML file line #10 in com.asksven.betterbatterystats:layout/preferences_fragment: Binary XML file line #10 in com.asksven.betterbatterystats:layout/preferences_fragment: Error inflating class fragment
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3432)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3596)
	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5456)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5362)
	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ClientTransactionHandler.executeTransaction(ClientTransactionHandler.java:58)
	at android.app.ActivityThread.handleRelaunchActivityLocally(ActivityThread.java:5415)
	at android.app.ActivityThread.access$3300(ActivityThread.java:238)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2077)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7705)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
Caused by: android.view.InflateException: Binary XML file line #10 in com.asksven.betterbatterystats:layout/preferences_fragment: Binary XML file line #10 in com.asksven.betterbatterystats:layout/preferences_fragment: Error inflating class fragment
Caused by: android.view.InflateException: Binary XML file line #10 in com.asksven.betterbatterystats:layout/preferences_fragment: Error inflating class fragment
Caused by: java.lang.IllegalStateException: Fragment com.asksven.betterbatterystats.PreferencesFragmentActivity$PrefsFragment did not create a view.
	at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3594)
	at android.app.FragmentController.onCreateView(FragmentController.java:104)
	at android.app.Activity.onCreateView(Activity.java:7106)
	at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:300)
	at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1067)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:995)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:706)
	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:195)
	at com.asksven.betterbatterystats.PreferencesFragmentActivity.onCreate(PreferencesFragmentActivity.java:52)
	at android.app.Activity.performCreate(Activity.java:7994)
	at android.app.Activity.performCreate(Activity.java:7978)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1310)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3405)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3596)
	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5456)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5362)
	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ClientTransactionHandler.executeTransaction(ClientTransactionHandler.java:58)
	at android.app.ActivityThread.handleRelaunchActivityLocally(ActivityThread.java:5415)
	at android.app.ActivityThread.access$3300(ActivityThread.java:238)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2077)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7705)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)

Also, on reopen the Theme is changed to Light instead of System, and the crash no longer occurs.

But I can repro if I Clear App Data.

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

1 participant