com.facebook.react.devsupport.JSException: не удается найти переменную: MapPage - PullRequest
0 голосов
/ 20 апреля 2020

При попытке запустить приложение, написанное на реагирующем языке, я получаю эту ошибку. Не могу гуглить ничего подобного. Те же ошибки либо из android studio в эмуляторе, либо после использования "npx Reaction-native Run- android"

UPD. Поэтому решение состоит в том, чтобы восстановить файл индекса. android .bundle Полное описание, которое я нашел здесь - https://medium.com/@adityasingh_32512 / решено-невозможно-загрузить-скрипт-из-активов-индекса- android -bundle-bdc5e3a3d5ff

Основная команда:

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

Код ошибки, изначально полученный у меня:

E/unknown:ReactNative: Exception in native call from JS
    com.facebook.react.devsupport.JSException: Can't find variable: MapPage
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:907)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loop(Looper.java:216)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:923)
     Caused by: com.facebook.jni.CppException: Can't find variable: MapPage

    c@index.android.bundle:25:260
    index.android.bundle:24:60
    v@index.android.bundle:2:1474
    index.android.bundle:146:70
    v@index.android.bundle:2:1474
    index.android.bundle:91:132
    v@index.android.bundle:2:1474
    d@index.android.bundle:2:876
    global code@index.android.bundle:439:4
        ... 7 more
...