Unable to load script.Make sure you're either running a metro server (run 'react-native start' )

遇到的问题

当react-native run-android运行时打开遇到
Unable to load script.Make sure you’re either running a metro server (run ‘react-native start’ )

在这里插入图片描述

解决方案

在创建的项目目录/android/app/build.gradle里修改
Unable to load script.Make sure you're either running a metro server (run 'react-native start' )_第1张图片
这样在重新运行就可以正常打开了

你可能感兴趣的:(react,native,夜神模拟器,android,安卓,gradle,react,native)