React Native 项目 (RN CLI) 中的包名称。我必须在 firebase 中使用包名

问题描述 投票:0回答:1

位置:android/app/src/androidmanifest.xml 我们通常根据documentation找到我们项目的包名。但我在那里找不到它。我怎样才能得到我的应用程序包名称?

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
      android:name=".MainApplication"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:allowBackup="false"
      android:theme="@style/AppTheme">
      <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
        android:launchMode="singleTask"
        android:windowSoftInputMode="adjustResize"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
      </activity>
    </application>
</manifest>

我也在 android studio 中打开了 androidmanifest.xml 文件,但我仍然找不到我的项目包名称。现在不知道去哪里找。一些Youtube教程说这个文件中的一些代码行在android studio中可以看到但仍然没有解决方案。

android reactjs react-navigation android-manifest package-name
1个回答
0
投票

请注意,React Native CLI 项目中的 Android 包名称通常在您使用

react-native init
命令创建新项目时设置。如果您需要更改 Android 包名称,可以通过修改
AndroidManifest.xml
文件中的包属性以及位于
build.gradle
android/app/build.gradle
文件中的包属性来实现。在
applicationId
块下寻找
defaultConfig
字段。这是您的 Android 包名称。

© www.soinside.com 2019 - 2024. All rights reserved.