Skip to content

Android build fails when App_Resources folder is renamed #3400

Closed

Description

@Natalia-Hristova

Please, provide the details below:

Tell us about the problem

If you rename App_Resources folder and set the new path in nsconfig.json - build fails.

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

Please tell us how to recreate the issue in as much detail as possible.

  1. tns create SomeApp
  2. Rename App_Resources folder
  3. In project root folder create nsconfig.json with the new path to App_Resources folder like this:
  4. tns run android
{
    "appResourcesPath": "app/My_App_Resources"
}

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Here is the log

Searching for devices...
Preparing project...
Successfully prepared plugin nativescript-theme-core for android.
Successfully prepared plugin tns-core-modules for android.
Successfully prepared plugin tns-core-modules-widgets for android.
Project successfully prepared (Android)
Building project...
Gradle build...
         + applying user-defined configuration from .../AppNSConfig3/app/My_App_Resources/Android/app.gradle
         + adding nativescript runtime package dependency: nativescript-optimized
         + adding aar plugin dependency: .../AppNSConfig3/node_modules/tns-core-modules-widgets/platforms/android/widgets-release.aar
false
.../AppNSConfig3/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:28:23-37: AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
    
.../AppNSConfig3/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:35:28-52: AAPT: No resource found that matches the given name (at 'theme' with value '@style/LaunchScreenTheme').
    
.../AppNSConfig3/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:25: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/icon').

.../AppNSConfig3/platforms/android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:31: error: Error: No resource found that matches the given name (at 'theme' with value '@style/LaunchScreenTheme').



FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 15s
Unable to apply changes on device: emulator-5554. Error is: Command ./gradlew failed with exit code 1.

Activity

  1. added this to the 4.0.0 milestone on Feb 27, 2018
  2. Natalia-Hristova commented on Mar 6, 2018

    @Natalia-Hristova
    Author

    This is fixed in the current master branch and the next tag of nativescript-cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions