Skip to content

Android build fails when App_Resources folder is renamed #3400

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Natalia-Hristova opened this issue Feb 27, 2018 · 1 comment
Closed

Android build fails when App_Resources folder is renamed #3400

Natalia-Hristova opened this issue Feb 27, 2018 · 1 comment
Assignees
Milestone

Comments

@Natalia-Hristova
Copy link

Natalia-Hristova commented Feb 27, 2018

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.
@Natalia-Hristova
Copy link
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
Projects
None yet
Development

No branches or pull requests

3 participants