cmartinezv opened a new issue, #1497:
URL: https://github.com/apache/cordova-android/issues/1497
# Bug Report
## Problem
After upgrading my project to cordova-android11 after opening my app I'm
getting a RuntimeException only with Android API S, is working fine with API 33
and API 29.
### What is expected to happen?
Show splashscreen and run app normally.
### What does actually happen?
I'm getting this error:
2022-09-21 09:53:07.284 7821-7821/io.ionic.starter E/AndroidRuntime: FATAL
EXCEPTION: main
Process: io.ionic.starter, PID: 7821
java.lang.RuntimeException: Unable to start activity
ComponentInfo{io.ionic.starter/io.ionic.starter.MainActivity}:
android.view.InflateException: Binary XML file line #24 in
io.ionic.starter:layout/splash_screen_view: Failed to resolve attribute at
index 0: TypedValue{t=0x2/d=0x7f0300df a=-1}
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3608)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3765)
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:102)
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:2193)
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:7796)
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:974)
Caused by: android.view.InflateException: Binary XML file line #24 in
io.ionic.starter:layout/splash_screen_view: Failed to resolve attribute at
index 0: TypedValue{t=0x2/d=0x7f0300df a=-1}
Caused by: java.lang.UnsupportedOperationException: Failed to resolve
attribute at index 0: TypedValue{t=0x2/d=0x7f0300df a=-1}
at
android.content.res.TypedArray.getLayoutDimension(TypedArray.java:827)
at
android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:8230)
at
android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:8428)
at
android.widget.FrameLayout$LayoutParams.<init>(FrameLayout.java:452)
at
android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:380)
at
android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:58)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1129)
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 android.view.View.inflate(View.java:27024)
at
androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl$_splashScreenView$2.invoke(SplashScreenViewProvider.kt:94)
at
androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl$_splashScreenView$2.invoke(SplashScreenViewProvider.kt:93)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at
androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl.get_splashScreenView(SplashScreenViewProvider.kt:93)
at
androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl.createSplashScreenView(SplashScreenViewProvider.kt:103)
at
androidx.core.splashscreen.SplashScreenViewProvider.<init>(SplashScreenViewProvider.kt:52)
at
androidx.core.splashscreen.SplashScreen$Impl.setOnExitAnimationListener(SplashScreen.kt:305)
at
androidx.core.splashscreen.SplashScreen.setOnExitAnimationListener(SplashScreen.kt:185)
at
org.apache.cordova.SplashScreenPlugin.setupSplashScreen(SplashScreenPlugin.java:141)
at
org.apache.cordova.SplashScreenPlugin.onMessage(SplashScreenPlugin.java:113)
at
org.apache.cordova.PluginManager.lambda$postMessage$0(PluginManager.java:345)
at
org.apache.cordova.PluginManager$$ExternalSyntheticLambda0.accept(Unknown
Source:8)
at java.util.LinkedHashMap.forEach(LinkedHashMap.java:724)
at
java.util.Collections$SynchronizedMap.forEach(Collections.java:2698)
at
org.apache.cordova.PluginManager.postMessage(PluginManager.java:343)
at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:161)
at
org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:234)
at io.ionic.starter.MainActivity.onCreate(MainActivity.java:40)
2022-09-21 09:53:07.285 7821-7821/io.ionic.starter E/AndroidRuntime: at
android.app.Activity.performCreate(Activity.java:8036)
at android.app.Activity.performCreate(Activity.java:8016)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3581)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3765)
at
android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:102)
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:2193)
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:7796)
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:974)
2022-09-21 09:53:07.331 7821-7821/io.ionic.starter I/Process: Sending
signal. PID: 7821 SIG: 9
## Information
<!-- Include all relevant information that might help understand and
reproduce the problem -->
This bug is resolved when I add a splash_screen_view.xml file myself in the
layout folder, but after then API 29 doesn't work.
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you
experiencing the issue? -->
cordova-android@11
Android API S Simulator
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]