question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

targetSdkVersion 23 lead crash

See original GitHub issue

Issue Description

I introduce RN to my project,when I start up my App,it’s crashed and I got the bellow info(Code Snippets) ,even I start up the sample of RN,if I change the targetSdkVersion to 23,the app also crashed.

I have cost a day and finally found it is targetSdkVersion 23 lead this crash,then I change the targetSdkVersion to 22,it’s been OK,I don’t know why.

Steps to Reproduce / Code Snippets

[`java.lang.RuntimeException: Could not get BatchedBridge, make sure your bundle is packaged correctly at com.facebook.react.cxxbridge.CatalystInstanceImpl.loadScriptFromAssets(Native Method) at com.facebook.react.cxxbridge.JSBundleLoader$1.loadScript(JSBundleLoader.java:33) at com.facebook.react.cxxbridge.CatalystInstanceImpl.runJSBundle(CatalystInstanceImpl.java:177) at com.facebook.react.XReactInstanceManagerImpl$4.call(XReactInstanceManagerImpl.java:918) at com.facebook.react.XReactInstanceManagerImpl$4.call(XReactInstanceManagerImpl.java:911) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$1.run(MessageQueueThreadImpl.java:74) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) at android.os.Looper.loop(Looper.java:158) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:196) at java.lang.Thread.run(Thread.java:818)

and android.view.WindowManager$BadTokenException: Unable to add window android.view.ViewRootImpl$W@2e3a19b – permission denied for this window type at android.view.ViewRootImpl.setView(ViewRootImpl.java:875) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:337) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) at android.app.Dialog.show(Dialog.java:350) at com.facebook.react.devsupport.DevSupportManagerImpl.handleReloadJS(DevSupportManagerImpl.java:644) at com.facebook.react.XReactInstanceManagerImpl$3$1.run(XReactInstanceManagerImpl.java:405) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7237) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)`]

Expected Results

[targetSdkVersion 23 should not lead crash]

Additional Information

  • React Native version: [0.35.0]
  • Platform(s) (iOS, Android, or both?): [Android 6.0.1 Samsung SM-G9200]
  • Operating System (macOS, Linux, or Windows?): [macOS]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jpshelleycommented, Dec 6, 2016

PR Open to fix this ^^ #11316

0reactions
hramoscommented, May 25, 2017

Closing this issue because it has been inactive for a while. If you think it should still be opened let us know why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Behavior changes: apps targeting API 29+ - Android Developers
If your app sets targetSdkVersion to "29" or higher, you should modify your ... by the Android Runtime (ART) could cause runtime crashes...
Read more >
Meeting SDK still crashes on Android 12 or 13 - when ...
I have tried upgrading the Meeting SDK to the latest. How To Reproduce. Set targetSdkVersion 33; Set compileSdkVersion 33; Try to join a...
Read more >
[Android S] java.lang.IllegalArgumentException [194108978]
targetSdkVersion : 31 ... Only just declaring this "work" dependency in gradle will lead crash on startup. ... gmail.com> #10 Sep 23, 2021...
Read more >
minifiedEnabled leads to renderscript crash >Kitkat
The problem persists Dec 2016 but proguard rules work: -keep class com.photoembroidery.tat.olsennoise.** {*;} -keep class android.support.v8.renderscript.
Read more >
Let's use Android 12, Migration of our Android Apps ... - Medium
compileSdkVersion and targetSdkVersion to 31. app/build.gradle android { compileSdkVersion 31 defaultConfig { minSdkVersion 23 targetSdkVersion 31
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found