Application project not registered

I am trying to run my application on my device. so i'm running react-native start

everything looks good. enter image description here

and on startup react-native run-android

i get this error enter image description here

otherwise i get this error on my device

enter image description here

+6


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


source


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


source


Uninstall / uninstall APP first and then do a clean install and see if it works.

0


source







All Articles