You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2023/01/05 15:14:45 UTC

[GitHub] [cordova-android] asaf-interator opened a new issue, #1534: java.lang.RuntimeException: Unable to start activity ComponentInfo

asaf-interator opened a new issue, #1534:
URL: https://github.com/apache/cordova-android/issues/1534

   # 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.<init>(ViewGroup.java:7746)
   01-03 19:28:28.925 27623 27623 E AndroidRuntime: 	at android.widget.FrameLayout$LayoutParams.<init>(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.<init>(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
   - [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: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] asaf-interator commented on issue #1534: java.lang.RuntimeException: Unable to start activity ComponentInfo

Posted by GitBox <gi...@apache.org>.
asaf-interator commented on issue #1534:
URL: https://github.com/apache/cordova-android/issues/1534#issuecomment-1375406089

   I think I solved the issue with a different image, but I'm not sure why.
   Seems related to [1497](https://github.com/apache/cordova-android/issues/1497)


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] java.lang.RuntimeException: Unable to start activity ComponentInfo [cordova-android]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1534:
URL: https://github.com/apache/cordova-android/issues/1534#issuecomment-1758629579

   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.


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Re: [I] java.lang.RuntimeException: Unable to start activity ComponentInfo [cordova-android]

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #1534: java.lang.RuntimeException: Unable to start activity ComponentInfo
URL: https://github.com/apache/cordova-android/issues/1534


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] andreszs commented on issue #1534: java.lang.RuntimeException: Unable to start activity ComponentInfo

Posted by "andreszs (via GitHub)" <gi...@apache.org>.
andreszs commented on issue #1534:
URL: https://github.com/apache/cordova-android/issues/1534#issuecomment-1698195692

   The workaround I found is to edit **AndroidManifest.xml** and replace:android:theme="@style/Theme.AppCompat.NoActionBar"
   with: android:theme="@style/Theme.App.SplashScreen"
   
   However, everytime the app is built, this change is reverted, and involves a double-building first with Cordova, then Android Studio to deploy with the fixed manifest XML. Any ideas on how to avoid this and have the proper theme set in AndroidManifest.xml directly with Cordova CLI?
   


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] asaf-interator commented on issue #1534: java.lang.RuntimeException: Unable to start activity ComponentInfo

Posted by GitBox <gi...@apache.org>.
asaf-interator commented on issue #1534:
URL: https://github.com/apache/cordova-android/issues/1534#issuecomment-1374871458

   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)


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] jcesarmobile commented on issue #1534: java.lang.RuntimeException: Unable to start activity ComponentInfo

Posted by GitBox <gi...@apache.org>.
jcesarmobile commented on issue #1534:
URL: https://github.com/apache/cordova-android/issues/1534#issuecomment-1374941049

   can you provide a sample app?


-- 
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: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org