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 crashes on launch #69

Open
vthriller opened this issue Oct 1, 2023 · 2 comments
Open

app crashes on launch #69

vthriller opened this issue Oct 1, 2023 · 2 comments
Labels

Comments

@vthriller
Copy link

10-01 20:18:07.234 31439 31439 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{net.tjado.passwdsafe/net.tjado.passwdsafe.PasswdSafe}: android.view.InflateException: Binary XML file line #89: Binary XML file line #89: Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3121)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3264)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7063)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #89: Binary XML file line #89: Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView
10-01 20:18:07.234 31439 31439 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #89: Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView
10-01 20:18:07.234 31439 31439 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at java.lang.reflect.Constructor.newInstance0(Native Method)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.createView(LayoutInflater.java:686)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:829)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:902)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:863)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:554)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:461)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:383)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:775)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:197)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at net.tjado.passwdsafe.PasswdSafe.onCreate(PasswdSafe.java:392)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7327)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7318)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3101)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3264)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7063)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
10-01 20:18:07.234 31439 31439 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Drawable net.tjado.passwdsafe:color/tab_bg_color with resource ID #0x7f06040d
10-01 20:18:07.234 31439 31439 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: File res/color/tab_bg_color.xml from drawable resource ID #0x7f06040d
10-01 20:18:07.234 31439 31439 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:898)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:677)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.content.res.Resources.getDrawableForDensity(Resources.java:903)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.content.res.Resources.getDrawable(Resources.java:842)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.content.Context.getDrawable(Context.java:628)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at androidx.core.content.ContextCompat$Api21Impl.getDrawable(ContextCompat.java:1110)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:526)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.navigation.NavigationBarItemView.setItemBackground(NavigationBarItemView.java:676)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.navigation.NavigationBarMenuView.buildMenuView(NavigationBarMenuView.java:729)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.navigation.NavigationBarPresenter.updateMenuView(NavigationBarPresenter.java:72)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.navigation.NavigationBarView.inflateMenu(NavigationBarView.java:382)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.navigation.NavigationBarView.<init>(NavigationBarView.java:276)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.bottomnavigation.BottomNavigationView.<init>(BottomNavigationView.java:108)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.bottomnavigation.BottomNavigationView.<init>(BottomNavigationView.java:103)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.google.android.material.bottomnavigation.BottomNavigationView.<init>(BottomNavigationView.java:98)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at java.lang.reflect.Constructor.newInstance0(Native Method)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.createView(LayoutInflater.java:686)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:829)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:902)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:863)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:554)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:461)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.view.LayoutInflater.inflate(LayoutInflater.java:383)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:775)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:197)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at net.tjado.passwdsafe.PasswdSafe.onCreate(PasswdSafe.java:392)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7327)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7318)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3101)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3264)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:214)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7063)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 0: TypedValue{t=0x2/d=0x7f04016c a=-1}
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.content.res.TypedArray.getDrawableForDensity(TypedArray.java:946)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.content.res.TypedArray.getDrawable(TypedArray.java:930)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.graphics.drawable.StateListDrawable.inflateChildElements(StateListDrawable.java:177)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:122)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:146)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1359)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1318)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:879)
10-01 20:18:07.236 31439 31439 E AndroidRuntime: 	... 42 more

The following fixes crash for me, but I have no clue what any of that means and what's proper way to fix that:

diff --git a/authorizer/src/main/res/color/tab_bg_color.xml b/authorizer/src/main/res/color/tab_bg_color.xml
index 11b34e58..52135a84 100644
--- a/authorizer/src/main/res/color/tab_bg_color.xml
+++ b/authorizer/src/main/res/color/tab_bg_color.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
     <item android:color="@color/primary" android:drawable="@color/primary" android:state_checked="true" />
-    <item android:color="?attr/customNavigationBarColor" android:drawable="?attr/customNavigationBarColor" />
 </selector>

This is from Galaxy A40 running Android 9, btw.

@tejado
Copy link
Owner

tejado commented Oct 1, 2023

Thank you very much - I will look into it!

@tejado tejado added the bug label Oct 1, 2023
@nchursin
Copy link

nchursin commented Oct 3, 2023

Same here. Xiaomi MI 6

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