美文网首页
Unable to load script.Make sure

Unable to load script.Make sure

作者: 像少年啦飞驰____ | 来源:发表于2020-10-20 20:32 被阅读0次

    react-native uodate 0.61 to 0.63,command terminates by leaving a message in android simulator. The message is as follows:

    Unable to load script.Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release.

    vCZZs.png

    These steps really help me:

    Step 1: Create a directory in android/app/src/main/assets

    Linux command: mkdir android/app/src/main/assets

    mkdir android/app/src/main/assets
    

    Step 2: Rename index.android.js (in root directory) to index.js (Maybe there is an index.js file in which case you do not need to rename it) then run the following command:

     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
    

    Step 3: Build your APK: react-native run-android

    Please use index.js in latest version.

    相关文章

      网友评论

          本文标题:Unable to load script.Make sure

          本文链接:https://www.haomeiwen.com/subject/lgcjmktx.html