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

java.lang.RuntimeException: Unable to start activity ComponentInfo #1534

Closed
3 tasks done
asaf-interator opened this issue Jan 5, 2023 · 4 comments
Closed
3 tasks done
Labels
info-needed / awaiting response Further information is requested

Comments

@asaf-interator
Copy link

Bug Report

Problem

Run well on devices with Android 11-12, crashes when launch on devices with Android 8-10

What is expected to happen?

Launch app and run normally

What does actually happen?

App crashes on launch with the App has stopped message

Information

01-03 19:28:28.921 27623 27623 D AndroidRuntime: Shutting down VM
01-03 19:28:28.925 27623 27623 E AndroidRuntime: FATAL EXCEPTION: main
01-03 19:28:28.925 27623 27623 E AndroidRuntime: Process: com.jwed.match.app, PID: 27623
01-03 19:28:28.925 27623 27623 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jwed.match.app/com.jwed.match.app.MainActivity}: android.view.InflateException: Binary XML file line #24: Failed to resolve attribute at index 0: TypedValue{t=0x2/d=0x7f030355 a=-1}
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #24: Failed to resolve attribute at index 0: TypedValue{t=0x2/d=0x7f030355 a=-1}
01-03 19:28:28.925 27623 27623 E AndroidRuntime: Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 0: TypedValue{t=0x2/d=0x7f030355 a=-1}
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:771)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:7554)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.ViewGroup$MarginLayoutParams.(ViewGroup.java:7746)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.widget.FrameLayout$LayoutParams.(FrameLayout.java:439)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:370)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.widget.FrameLayout.generateLayoutParams(FrameLayout.java:368)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:865)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.view.View.inflate(View.java:23239)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl$_splashScreenView$2.invoke(SplashScreenViewProvider.kt:94)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl$_splashScreenView$2.invoke(SplashScreenViewProvider.kt:93)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl.get_splashScreenView(SplashScreenViewProvider.kt:93)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at androidx.core.splashscreen.SplashScreenViewProvider$ViewImpl.createSplashScreenView(SplashScreenViewProvider.kt:103)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at androidx.core.splashscreen.SplashScreenViewProvider.(SplashScreenViewProvider.kt:52)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at androidx.core.splashscreen.SplashScreen$Impl.setOnExitAnimationListener(SplashScreen.kt:305)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at androidx.core.splashscreen.SplashScreen.setOnExitAnimationListener(SplashScreen.kt:185)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at org.apache.cordova.SplashScreenPlugin.setupSplashScreen(SplashScreenPlugin.java:141)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at org.apache.cordova.SplashScreenPlugin.onMessage(SplashScreenPlugin.java:113)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at org.apache.cordova.PluginManager.lambda$postMessage$0(PluginManager.java:345)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at org.apache.cordova.PluginManager$$ExternalSyntheticLambda0.accept(Unknown Source:8)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at java.util.Collections$SynchronizedMap.forEach(Collections.java:2691)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at org.apache.cordova.PluginManager.postMessage(PluginManager.java:343)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at org.apache.cordova.CordovaActivity.init(CordovaActivity.java:161)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at org.apache.cordova.CordovaActivity.loadUrl(CordovaActivity.java:234)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at com.jwed.match.app.MainActivity.onCreate(MainActivity.java:40)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7009)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7000)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
01-03 19:28:28.925 27623 27623 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)

Command or Code

cordova run android --device

Environment, Platform, Device

Devices with Android 8-10

Version information

Cordova 11.0
cordova-android@11.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@asaf-interator
Copy link
Author

asaf-interator commented Jan 8, 2023

When changing
preference name="AndroidWindowSplashScreenAnimatedIcon" value="assets/images/icon-1024.png"
to
preference name="AndroidWindowSplashScreenAnimatedIcon" value="assets/splashscreen.xml"
I'm getting a different issue:

01-08 18:02:37.085 24716 24716 E AndroidRuntime: FATAL EXCEPTION: main
01-08 18:02:37.085 24716 24716 E AndroidRuntime: Process: com.jwed.match.app, PID: 24716
01-08 18:02:37.085 24716 24716 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jwed.match.app/com.jwed.match.app.MainActivity}: android.content.res.Resources$NotFoundException: Drawable com.jwed.match.app:drawable/ic_cdv_splashscreen with resource ID #0x7f07007f
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: Drawable com.jwed.match.app:drawable/ic_cdv_splashscreen with resource ID #0x7f07007f
01-08 18:02:37.085 24716 24716 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ic_cdv_splashscreen.xml from drawable resource ID #0x7f07007f
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:820)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:630)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.content.res.Resources.getDrawableForDensity(Resources.java:877)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.content.res.Resources.getDrawable(Resources.java:819)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.content.res.Resources$Theme.getDrawable(Resources.java:1597)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at androidx.core.splashscreen.SplashScreen$Impl.install(SplashScreen.kt:264)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at androidx.core.splashscreen.SplashScreen.install(SplashScreen.kt:189)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at androidx.core.splashscreen.SplashScreen.access$install(SplashScreen.kt:121)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at androidx.core.splashscreen.SplashScreen$Companion.installSplashScreen(SplashScreen.kt:146)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at androidx.core.splashscreen.SplashScreen.installSplashScreen(Unknown Source:2)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at org.apache.cordova.CordovaActivity.onCreate(CordovaActivity.java:110)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at com.jwed.match.app.MainActivity.onCreate(MainActivity.java:31)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7009)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7000)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: Caused by: android.view.InflateException: Class is not a Drawable androidx.constraintlayout.widget.ConstraintLayout
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.graphics.drawable.DrawableInflater.inflateFromClass(DrawableInflater.java:214)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.graphics.drawable.DrawableInflater.inflateFromXmlForDensity(DrawableInflater.java:139)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.graphics.drawable.Drawable.createFromXmlInnerForDensity(Drawable.java:1295)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.graphics.drawable.Drawable.createFromXmlForDensity(Drawable.java:1254)
01-08 18:02:37.085 24716 24716 E AndroidRuntime: at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:807)

@jcesarmobile
Copy link
Member

can you provide a sample app?

@jcesarmobile jcesarmobile added the info-needed / awaiting response Further information is requested label Jan 8, 2023
@asaf-interator
Copy link
Author

I think I solved the issue with a different image, but I'm not sure why.
Seems related to 1497

@breautek
Copy link
Contributor

Closing...

It was determined that this issue is caused either by a missing resource (e.g. a plugin or framework overriding a theme) or the icon resource is a vector and is using a feature not supported by the device.

@breautek breautek closed this as not planned Won't fix, can't repro, duplicate, stale Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed / awaiting response Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants