Unable to load script. Make sure you'reeither running a Metro server(run react-native start )or that your bundle ‘index. android.bundle’ is packaged correctly for release

從git上clone下來(lái)的項(xiàng)目
在Android 環(huán)境配置完成,并且外接手機(jī)設(shè)備沒(méi)有問(wèn)題。
運(yùn)行npm run android 出現(xiàn)上面異常
查看項(xiàng)目目錄下->android->app->src是否有debug文件夾
如沒(méi)有 新建debug文件夾->新建AndroidManifest.xml文件
寫入如下內(nèi)容
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
</manifest>