Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native 0.59 development build fails with metro server error

After upgrade to 0.59 the development build fails with the following error. It worked fine till 0.58.6

"Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle is packaged correctly for release."

I have also added android:usesCleartextTraffic="true" in AndroidManifest.xml but it still won't work. The release build works fine though.

like image 375
Ehsan Avatar asked Mar 18 '19 06:03

Ehsan


1 Answers

You need to change your target sdk to 27 instead of 28 in your project level build.gradle. From Android P(28), Google ban the use of http.

enter image description here

like image 73
Coldsparkle Avatar answered Oct 13 '22 09:10

Coldsparkle