Unable to load script from assets 'index.android.bundle' 出错?

野路子太多,坑人真的!F**k

言归正传,当你运行 react native 程序的时候出现这个错误 ,如果您使用Windows,请按以下方式运行命令,或者如果出现错误“无法找到条目文件index.android.js”,那么我这一招能救你

第一步(创建缺失的目录):mkdir android\app\src\main\assets
第二步(在创建好的目录添加程序需要的文件):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
第三步:react-native run-android

好了,继续嚼着黄连敲代码吧!

Unable to load script from assets 'index.android.bundle' 出错?

时间: 2024-08-01 08:01:38

Unable to load script from assets 'index.android.bundle' 出错?的相关文章

unable to load script from assets 'index.android bundle'

在Android手机上运行React-native项目时 报错:unable to load script from assets 'index.android bundle'  ,make sure your bundle is packaged correctly or youu're runing a packager server 解决方案: 第一步:在  android/app/src/main 目录下创建一个  assets空文件夹 第二步:执行 下面这段命令 react-nativ

react native中Unable to load script from assets 'index.android.bundle'解决方案

刚刚朋友问我,说是创建好一个项目,运行后报错:Unable to load script from assets 'index.android.bundle',以前好好的没出现这种现象,于是我找到一个解决方案,分享一下. 解决这个问题的方案是: 进入你该项目的根目录下的 android目录下的app目录下的src文件下的mian文件,(可能说的有点绕),在main件夹下,创建一个assets文件,这个文件是rn的资源文件夹! 之后用dos进入你的项目根目录,执行一下命令: react-nativ

[React-Native] Unable to load script from assets 'index.android.bundle'.

react native for android 抛出下面异常,解决方法: java.lang.RuntimeException: Unable to load script from assets 'index.android.bundle'. https://stackoverflow.com/questions/44446523/unable-to-load-script-from-assets-index-android-bundle-on-windows (in project dir

项目初始化以后出现:Unable to load script from assets 'index.android.bundle

Mac中真机测试React Native project时出现Unable to load script from assets 'index.android.bundle' 2018年01月21日 01:59:38 neuHenry 阅读数:1186 版权声明:本文为博主原创文章,未经博主允许不得转载. https://blog.csdn.net/u010347226/article/details/79117940 刚接触学习React Native,在进行真机调试时,报错出现Unable

react-native启动时红屏报错:Unable to load script.Make sure you're either running a metro server or that ....

一.报错信息内容 我是在Android Studio中运行启动react-native项目时报的这个错误 1.报错提示:Unable to load script.Make sure you're either running a metro server( run 'react-native start' ) or that your bundle 'index.android.bundle' is packaged correctly for release. 2.中文翻译:无法加载脚本.请

Node升级 启动RN报错:react-native启动时红屏报错:Unable to load script.Make sure you're either running a metro server or that

1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 1. 项目中在android/app/src/main/创建文件夹  assets 2.项目中执行命令 react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle

Visual Studio 2015 NuGet Update-Package 失败/报错:Update-Package : Unable to load the service index for source https://api.nuget.org/v3/index.json.

起因 为了用VS2015 community中的NuGet获取Quartz,在[工具]-[NuGet包管理器]-[程序包管理器控制台]中执行 Install-Package Quartz. 却报如下错误: Update-Package : Unable to load the service index for source https://api.nuget.org/v3/index.json. 复制该网址到浏览器中,确实无法打开. 解决方法 经网上搜集资料,得知替换source即可.将原Nu

Update-Package : Unable to load the service index for source https://api.nuget.org/v3/index.json.

由于更改了项目"属性"的"目标框架"(原来的框架是".NET Frameword4.5"改为了".NET Frameword4") 提示错误 一些 NuGet 程序包是使用不同于当前目标框架的目标框架安装的, 可能需要重新安装.有关详细信息, 请访问 http://docs.nuget.org/docs/workflows/reinstalling-packages. 受到影响的程序包.... 我的是VS 2015 社区版..

android studio Unable to load class 'org.codehaus.groovy.runtime.typehandling.ShortTypeHandling'

今天导入之前的Android studio项目,出了一个很严重的Error,如下: Error:Unable to load class 'org.codehaus.groovy.runtime.typehandling.ShortTypeHandling'. Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometim