应用程序未在React Native中注册 [英] Application is not Registered in react native

查看:116
本文介绍了应用程序未在React Native中注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个React本机应用程序,我使用

I have a react native application and I changed the package name of the application using https://www.npmjs.com/package/react-native-rename. After that I tried to run the project but its saying that the application is not registered. I have tried the following steps also.

  1. 在android studio中打开了项目,并确保更改了包名称,并且所有文件也都使用相同的包名称.

  1. Opened the project in android studio and make sure that the package name is changed and all the files are also in the same package name.

试图清理旧的gradle文件.

Tried cleaning the old gradle files.

卸载了先前安装的应用版本(具有原始程序包名称的版本.

Uninstalled the previously installed version of the app (The one which have the original package name.

任何帮助将不胜感激.预先感谢

Any help would be appreciated. Thanks in advance

推荐答案

您需要检查2个文件,以确保其中具有相同的名称:

You need to check 2 files to make sure you have equal names there:

  1. index.js->最后一行中的应用程序名称:

AppRegistry.registerComponent('YourAppName', () => App);

  1. app.json->名称属性

两个地方的名称都应该相等(区分大小写).

In both places names should be equal (case sensitive).

这篇关于应用程序未在React Native中注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆