Question: I'm new in react-native.
I have run react native project on Ubuntu by using 'react-native run-android' command. And I got the error on emulator 
"Unable to load script from assets 'index.android.bundle'.Make sure your bundle is packaged correctly or you are running a package server."

Answer: 
In my case (embedding React Native as a new `Activity` into an existing Android Code Base), the problem was Android Studio had auto-imported the wrong **BuildConfig**.

Wrong:
`import com.facebook.react.BuildConfig;`

Right:
`import com.mywebdomain.myapp.BuildConfig;`

This would apply to the wherever you are housing this block of code:

```
mReactRootView = new ReactRootView(this);
mReactInstanceManager = ReactInstanceManager.builder()
        .setApplication(getApplication())
        .setBundleAssetName("index.android.bundle")
        .setJSMainModulePath("index")
        .addPackage(new MainReactPackage())
        .setUseDeveloperSupport(BuildConfig.DEBUG)
        .setInitialLifecycleState(LifecycleState.RESUMED)
        .build();

```
For this error :

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

1) Check for "**assets**" folder at : 

```
mkdir android\app\src\main\assets

```

If the folder is not available, create a folder with name "assets" manually. and execute the Curl command in terminal.

2). Curl command:

```
curl "http://localhost:8081/index.android.bundle?platform=android" -o"android/app/src/main/assets/index.android.bundle"

```

It will create the "index.android.bundle" file in assets folder automatically and resolved the issue.

3) Then:

```
 react-native run-android

```