Application project not registered
I am trying to run my application on my device. so i'm running react-native start
everything looks good.
and on startup react-native run-android
i get this error
otherwise i get this error on my device
+6
Sihem Hcine
source
to share
3 answers
My problem was that the name I gave to the project was different from the name that was registered in the AppRegistry
AppRegistry.registerComponent('proj', () => proj)
proj
should be the same as the project name in gradle and config files.
+5
Harry moreno
source
to share
You need to export the class. Use below code
import React, { Component } from 'react'
import { AppRegistry, Text, View } from 'react-native'
export default class proj extends Component {
render() {
return (
<View style={styles.container}> <Text > Welcome to PutainDeBiere! </Text> </View> )
}
}
AppRegistry.registerComponent('proj', () => proj)
+1
Wolverine
source
to share
Uninstall / uninstall APP first and then do a clean install and see if it works.
0
Brunaine
source
to share