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

MaterialComponents run success but Material3 carsh on TestApp #586

Open
hishampro5 opened this issue Nov 5, 2024 · 0 comments
Open

MaterialComponents run success but Material3 carsh on TestApp #586

hishampro5 opened this issue Nov 5, 2024 · 0 comments
Labels
bug Something isn't working triage Triage needed by maintainers

Comments

@hishampro5
Copy link

Describe the bug

I ma clone laste version of TestApp 3.0.1 when i am run testApp on my Locale emulater with android 14 app crashes

you can focus on =>
1- java.lang.RuntimeException: Unable to start activity ComponentInfo{org.readium.r2reader/org.readium.r2.testapp.MainActivity}: android.view.InflateException: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.Toolbar

2- Caused by: android.view.InflateException: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.Toolbar
Caused by: android.view.InflateException: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.Toolbar
Caused by: java.lang.reflect.InvocationTargetException

3- Caused by: android.content.res.Resources$NotFoundException: Drawable android:drawable/ic_ab_back_material with resource ID #0x1080316
Caused by: android.content.res.Resources$NotFoundException: File res/color-v31/m3_dynamic_default_color_primary_text.xml from ComplexColor resource ID #0x7f06008c

4- Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 0 to color: type=0x1, theme={InheritanceMap=[id=0x7f14029eorg.readium.r2reader:style/ThemeOverlay.AppCompat.ActionBar, id=0x7f14007aorg.readium.r2reader:style/Base.ThemeOverlay.AppCompat.ActionBar, id=0x7f140079org.readium.r2reader:style/Base.ThemeOverlay.AppCompat, id=0x7f140160org.readium.r2reader:style/Platform.ThemeOverlay.AppCompat], Themes=[org.readium.r2reader:style/ThemeOverlay.AppCompat.ActionBar, forced, org.readium.r2reader:style/ThemeOverlay.Material3.DynamicColors.Light, forced, org.readium.r2reader:style/AppTheme, forced, org.readium.r2reader:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}

............................................................
**All crash details **
.....................................
FATAL EXCEPTION: main
Process: org.readium.r2reader, PID: 18154
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.readium.r2reader/org.readium.r2.testapp.MainActivity}: android.view.InflateException: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.Toolbar
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
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:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: android.view.InflateException: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.Toolbar
Caused by: android.view.InflateException: Binary XML file line #42 in org.readium.r2reader:layout/abc_screen_toolbar: Error inflating class androidx.appcompat.widget.Toolbar
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:858)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1010)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.inflate(LayoutInflater.java:686)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at android.view.LayoutInflater.inflate(LayoutInflater.java:485)
at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:979)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:889)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:772)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:197)
at org.readium.r2.testapp.MainActivity.onCreate(MainActivity.kt:27)
at android.app.Activity.performCreate(Activity.java:8305)
at android.app.Activity.performCreate(Activity.java:8284)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
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:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
2024-11-05 15:10:03.975 18154-18154 AndroidRuntime org.readium.r2reader E at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: android.content.res.Resources$NotFoundException: Drawable android:drawable/ic_ab_back_material with resource ID #0x1080316
Caused by: android.content.res.Resources$NotFoundException: File res/color-v31/m3_dynamic_default_color_primary_text.xml from ComplexColor resource ID #0x7f06008c
at android.content.res.ResourcesImpl.loadComplexColorForCookie(ResourcesImpl.java:1155)
at android.content.res.ResourcesImpl.loadComplexColorFromName(ResourcesImpl.java:981)
at android.content.res.ResourcesImpl.loadColorStateList(ResourcesImpl.java:1060)
at android.content.res.Resources.loadColorStateList(Resources.java:1148)
at android.content.res.TypedArray.getColorStateList(TypedArray.java:604)
at android.graphics.drawable.VectorDrawable.updateStateFromTypedArray(VectorDrawable.java:762)
at android.graphics.drawable.VectorDrawable.applyTheme(VectorDrawable.java:631)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:684)
at android.content.res.Resources.loadDrawable(Resources.java:1002)
at android.content.res.Resources.getDrawableForDensity(Resources.java:992)
at android.content.res.Resources.getDrawable(Resources.java:931)
at android.content.Context.getDrawable(Context.java:810)
at androidx.core.content.ContextCompat$Api21Impl.getDrawable(ContextCompat.java:1049)
at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:485)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:149)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:137)
at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:66)
at androidx.appcompat.widget.TintTypedArray.getDrawable(TintTypedArray.java:84)
at androidx.appcompat.widget.Toolbar.(Toolbar.java:334)
at androidx.appcompat.widget.Toolbar.(Toolbar.java:262)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:858)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1010)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1130)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.inflate(LayoutInflater.java:686)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at android.view.LayoutInflater.inflate(LayoutInflater.java:485)
at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:979)
at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:889)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:772)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:197)
at org.readium.r2.testapp.MainActivity.onCreate(MainActivity.kt:27)
at android.app.Activity.performCreate(Activity.java:8305)
at android.app.Activity.performCreate(Activity.java:8284)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
2024-11-05 15:10:03.976 18154-18154 AndroidRuntime org.readium.r2reader E at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 0 to color: type=0x1, theme={InheritanceMap=[id=0x7f14029eorg.readium.r2reader:style/ThemeOverlay.AppCompat.ActionBar, id=0x7f14007aorg.readium.r2reader:style/Base.ThemeOverlay.AppCompat.ActionBar, id=0x7f140079org.readium.r2reader:style/Base.ThemeOverlay.AppCompat, id=0x7f140160org.readium.r2reader:style/Platform.ThemeOverlay.AppCompat], Themes=[org.readium.r2reader:style/ThemeOverlay.AppCompat.ActionBar, forced, org.readium.r2reader:style/ThemeOverlay.Material3.DynamicColors.Light, forced, org.readium.r2reader:style/AppTheme, forced, org.readium.r2reader:style/Theme.AppCompat.Empty, forced, android:style/Theme.DeviceDefault.Light.DarkActionBar, forced]}
at android.content.res.TypedArray.getColor(TypedArray.java:535)
at android.content.res.ColorStateList.inflate(ColorStateList.java:366)
at android.content.res.ColorStateList.createFromXmlInner(ColorStateList.java:296)
at android.content.res.ResourcesImpl.loadComplexColorForCookie(ResourcesImpl.java:1148)

How to reproduce?

1- clone last version of Test app
2- run testApp
3- you will get crash on android 14 S24Ultra

Readium version

3.0.1

Android API version

14

Additional context

No response

@hishampro5 hishampro5 added bug Something isn't working triage Triage needed by maintainers labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Triage needed by maintainers
Projects
None yet
Development

No branches or pull requests

1 participant