skip to Main Content

I was trying to set up firebase, which needed the package name of my current app, except when I went to the android manifest, I did not find the package name line, which shoud be in the second line, is that normal?

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application
        android:label="audio_inspect_app"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
    </application>

Usually it’s :

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.example.myapp">
<application ... >
 ...
</application>

Not sure what to do about this?

4

Answers


  1. The package name is in your gradle file of your project, not in manifest.

     defaultConfig {
            applicationId "com.example.myapp"
            ...
        }
    
    Login or Signup to reply.
  2. Please check your build.gradle file for package name. Here is the gradle file example

    defaultConfig {
        applicationId "com.example.app"
        minSdk 24
        targetSdk 33
        versionCode 1
        versionName "1.0"
    
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    

    Package name and applicationId both are same.

    Login or Signup to reply.
  3. is this a flutter project?. if so you can find it in the android =>app=>src=>build.gradle. Scroll down to the android tag. Namespace should be your package name. yes it’s normal I checked mine and got the same result as you.

    Login or Signup to reply.
  4. Not having the package attribute in the manifest is not an issue. The documentation states,

    In the Gradle-based build system, starting with AGP 7.3, don’t set the package value in the source manifest file directly.

    It can now be found in the gradle file. Once again the documentation states,

    Your application ID is defined by the applicationId property in your module’s build.gradle file, as shown here.

    android {
        defaultConfig {
            applicationId "com.example.myapp"
            ...
        }
        ...
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search