Skip to content
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

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

Closed
emiloberg opened this issue Sep 17, 2015 · 13 comments
Closed

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

emiloberg opened this issue Sep 17, 2015 · 13 comments
Milestone

Comments

@emiloberg
Copy link

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).

@NathanaelA

This comment was marked as abuse.

@NathanaelA

This comment was marked as abuse.

@dtopuzov
Copy link
Contributor

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

@emiloberg
Copy link
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?

@dtopuzov
Copy link
Contributor

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

@dtopuzov dtopuzov added this to the 1.4.0 milestone Sep 18, 2015
@dtopuzov dtopuzov added the bug label Sep 18, 2015
@NathanaelA

This comment was marked as abuse.

@rosen-vladimirov
Copy link
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.

@NathanaelA

This comment was marked as abuse.

@NathanaelA

This comment was marked as abuse.

@NathanaelA

This comment was marked as abuse.

@rosen-vladimirov
Copy link
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.

rosen-vladimirov added a commit to NativeScript/nativescript-cli that referenced this issue Sep 25, 2015
NPM Cache gets broken in some cases. Make sure to validate the sahsum of the cached package. Also validate specific directories in our `tns` related packages from npm, for example tns runtimes must have "framework" directory in the root of the unpacked dir.

Fixes NativeScript/NativeScript#763
rosen-vladimirov added a commit to NativeScript/nativescript-cli that referenced this issue Sep 25, 2015
NPM Cache gets broken in some cases. Make sure to validate the sahsum of the cached package. Also validate specific directories in our `tns` related packages from npm, for example tns runtimes must have "framework" directory in the root of the unpacked dir.

Fixes NativeScript/NativeScript#763
@rosen-vladimirov
Copy link
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.

@Fatme Fatme added the ready for test TSC needs to test this and confirm against live production apps and automated test suites label Sep 28, 2015
@vchimev vchimev added done and removed ready for test TSC needs to test this and confirm against live production apps and automated test suites labels Oct 6, 2015
@vchimev vchimev closed this as completed Oct 6, 2015
@vchimev
Copy link
Contributor

vchimev commented Mar 1, 2017

@msangapu,

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

Locking conversation here.

@NativeScript NativeScript locked and limited conversation to collaborators Mar 1, 2017
@NativeScript NativeScript deleted a comment Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants