I really don't know what's going on here. I've set up a basic app and used a codesharing method found here. It's all very basic, so here's the code:
// index.android.js
// index.ios.js
import React, { AppRegistry } from 'react-native';
import CompetitionAgent from './app/index';
AppRegistry.registerComponent('CompetitionAgent', () => CompetitionAgent);
And the component:
//./app/index.js
import React, { Component } from 'react';
import {
StyleSheet,
Text,
TextInput,
View
} from 'react-native';
export default class CompetitionAgent extends Component {
constructor() {
super();
this.state = {nickname:''};
}
render() {
return (
<View style={styles.container}>
<View style={styles.information}>
<Text style={styles.welcome}>
Welcome to the Competition Agent Connect app!
</Text>
<Text style={styles.instructions}>
When you are near a Competition Agent, you can join the session.
</Text>
</View>
<View style={{padding:10}}>
<TextInput style={styles.inputStyle} />
</View>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
information: {
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
inputStyle: {
flexDirection: 'row',
backgroundColor: '#3E3134',
color: '#FFFFFF',
}
});
I know the error could be many things. So this basic layout produces the same error.
import React, { Component } from 'react';
import {
StyleSheet,
Text,
TextInput,
View
} from 'react-native';
export default class CompetitionAgent extends Component {
constructor() {
super();
this.state = {nickname:''};
}
render() {
return (
<View style={styles.container}>
<Text style={styles.information}>
Welcome to the Competition Agent Connect app!
</Text>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
},
information: {
alignItems: 'center',
backgroundColor: '#F5FCFF',
}
});
The stacktrace:
E/unknown:React: Exception in native call
java.lang.RuntimeException: Error calling AppRegistry.runApplication
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:208)
at java.lang.Thread.run(Thread.java:818)
Caused by: com.facebook.jni.CppException: Could not get BatchedBridge, make sure your bundle is packaged correctly
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:158)
at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:208)
at java.lang.Thread.run(Thread.java:818)
It ran just fine yesterday, restarting Android Studio didn't help either.



