Skip to content

1.3 - Can not build new project due to missing App_Resources #763

Closed

Description

@emiloberg

Feel free to move this to the correct repo if needed.

As of 1.3, when creating a new project, it is unbuildable on Android due to missing App_Resources-folder.

When creating a new project:

tns create clean
cd clean
tns platform add ios
tns platform add android

tns deploy android --device 1

This fails with:

/Users/emiloberg/code/slask/clean-nativescript-project/clean/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:24:23-37 : No resource found that matches the given name (at 'icon' with value '@drawable/icon').

:processDebugResources FAILED

FAILURE: Build failed with an exception.

Reason for this is because there is no App_Resources folder (and it's content) in the app folder. When copying an App_Resources folder from another project, the build works.

I'd say this is quite major as new users can not create their first project.

(The project is buildable on iOS as iOS do not need an app icon).

Activity

  1. NathanaelA commented on Sep 17, 2015

    @NathanaelA
  2. NathanaelA commented on Sep 18, 2015

    @NathanaelA
  3. dtopuzov commented on Sep 18, 2015

    @dtopuzov
    Contributor

    Hi, this should be npm cache issue, please run:
    npm cache clean
    or manually delete your npm cache folder (at lest tns-* folders)

  4. emiloberg commented on Sep 18, 2015

    @emiloberg
    Author

    Working. Running

    npm cache clean
    tns create newproject
    

    will create a project with the App_Resources-folder.

    Ouch, this could be kinda hard to figure out, even for the seasoned developer. Hmm, is it possible to do a clean (or at least a check if clean is needed) as a part of the postinstall of nativescript?

  5. dtopuzov commented on Sep 18, 2015

    @dtopuzov
    Contributor

    Yes, we will try to provide fix in next release of {N}.

  6. added this to the 1.4.0 milestone on Sep 18, 2015
  7. NathanaelA commented on Sep 18, 2015

    @NathanaelA
  8. rosen-vladimirov commented on Sep 18, 2015

    @rosen-vladimirov
    Contributor

    Hi @NathanaelA ,
    The release version is not incorrect. The problem is with the npm cache itself, it somehow misses the AppResources directory. When you clean the cache, the template is downloaded again and it is the real one with AppResources dir.

  9. NathanaelA commented on Sep 18, 2015

    @NathanaelA
  10. NathanaelA commented on Sep 19, 2015

    @NathanaelA
  11. NathanaelA commented on Sep 23, 2015

    @NathanaelA
  12. rosen-vladimirov commented on Sep 25, 2015

    @rosen-vladimirov
    Contributor

    Hi @NathanaelA ,

    Please excuse me for the late reply, somehow I've missed this messages.
    We are not sure what is causing this behavior. The fact is that it happens when we use npm api (NativeScript CLI executes npm cache add command via npm api) it causes corruptions of the cache. In order to fix this, we are working on a SHA Sum check of the downloaded package and compare it to the one from registry.npmjs.org. We are already doing this for tns-android and tns-ios runtimes, I'll add the check for tns-template-hello-world* packages as well.

    Once again, please excuse me for the late reply and for the caused inconvenience.

  13. rosen-vladimirov commented on Sep 28, 2015

    @rosen-vladimirov
    Contributor

    Ok, I've added the fix for this issue in CLI's master branch. Hopefully we'll not face this problem anymore. Feel free to contact us in case you have any problems or concerns.

  14. added
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Sep 28, 2015
  15. added and removed
    ready for testTSC needs to test this and confirm against live production apps and automated test suites
    on Oct 6, 2015
  16. vchimev commented on Mar 1, 2017

    @vchimev
    Contributor

    @msangapu,

    Could you please open a new issue following the issue template and providing the information required?

    Locking conversation here.

  17. locked and limited conversation to collaborators on Mar 1, 2017
  18. ghost deleted a comment from on Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions