Unable to load script from assets index.android.bundle on windows

后端 未结 30 4220
鱼传尺愫
鱼传尺愫 2020-11-22 06:33

I\'m trying to run my first React Native project for first time on my device (Android 4.2.2).

And I get:

unable to load script from assets in

30条回答
  •  借酒劲吻你
    2020-11-22 06:58

    OS: Windows

    Another way to resolve this problem after trying two methods above
    (because I installed SDK not in DEFAULT LOCATION like C:\users\"user_name"\appdata\local\sdk)

    If you noticed that command line announced: "'adb' is not recognized as an internal or external command..."

    So this is how I get over:
    Examples: I installed SDK in D:\Android\sdk
    So I will insert path in System Variables 2 more lines:

    D:\Android\sdk\tools  
    D:\Android\sdk\platform-tools  
    

    (If you don't know how to edit path System Variables, here's the topic: https://android.stackexchange.com/questions/38321/what-do-i-type-in-path-variable-for-adb-server-to-start-from-cmd/38324)

    Then I run cmd again: react-native run-android

    It worked for me.

提交回复
热议问题