Skip to content

Specifying package name after migrating to 8.8 #1817

@dlcole

Description

@dlcole

Environment

✔ Component nativescript has 8.8.0 version and is up to date.
✔ Component @nativescript/core has 8.8.1 version and is up to date.
✔ Component @nativescript/ios has 8.8.1 version and is up to date.
✔ Component @nativescript/android has 8.8.0 version and is up to date.

Describe the bug

I'm updating my white label app from {N} 8.7 to 8.8. ns doctor shows all green checks. Ran ns clean and tried to run on Android. Updated Java from 11 to 21, then hit the error, Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported..

OK, so I modified app.gradle to include a namespace attribute:

android {  
  compileSdkVersion 33 
  defaultConfig {  
    generatedDensities = []
    namespace = "tech.govia.gvtbase"
    applicationId = "tech.govia.festivelo" 
    multiDexEnabled true
    minSdkVersion 21
    targetSdkVersion 33
    versionCode 36
    versionName "8.0.0"
  }  

But now I get the error AAPT: error: resource style/LaunchScreenTheme (aka tech.govia.festivelo:style/LaunchScreenTheme) not found.

I realize it's unusual to have a package name (or now namespace) that differs from the application ID, but that's what I need for a white label app.

Is there some different way to specify the package name, or does {N} 8.8 and @nativescript/android 8.8.0 no longer support this?

To Reproduce

Build any Nativescript Core app with {N} 8.8 that specifies package= in AndroidManifest.xml.

Expected behavior

Sample project

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions