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

Unable to build Android release APK (Error calling AppRegistry.runApplication) #15882

Closed
gurmukhp opened this issue Sep 10, 2017 · 2 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@gurmukhp
Copy link

Is this a bug report?

YES

Have you read the Contributing Guidelines?

YES

Environment

  1. react-native -v:
    react-native-cli: 2.0.1
    react-native: 0.48.1

  2. node -v:
    v8.4.0

  3. npm -v:
    5.4.1

  • Target Platform: Android

  • Development Operating System: Mac OS Sierra

  • Build tools: react-native run-android --variant=release

Steps to Reproduce

  1. Attempt to bulid Android release APK using react-native run-android --variant=release
  2. App successfully build

Expected Behavior

App loads on device

Actual Behavior

App keeps crashing on startup. It looks like the JS isn't bundled on the APP. I've tried clearing node-modules, watchman, starting react package manager before or during, but still the same issue. This build absolutely fine on iOS.

Logs:

FATAL EXCEPTION: mqt_js
Process: com.cryptoportfolio, PID: xxx
java.lang.RuntimeException: Error calling AppRegistry.runApplication
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:164)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194)
at java.lang.Thread.run(Thread.java:764)
 Caused by: com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly

@sephi-dev
Copy link

Did you fix it ? I've the same issue..

@gurmukhp
Copy link
Author

Yes, I realised that I had commented the whole Android file out!

I just needed to export as per index.ios.js and then it worked.

Hope that's the fix for you too :)

@facebook facebook locked as resolved and limited conversation to collaborators Sep 11, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Sep 11, 2018
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants