Skip to content

Build failure for helloworld project on nativescript.org #299

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
hy9be opened this issue Mar 11, 2015 · 9 comments
Closed

Build failure for helloworld project on nativescript.org #299

hy9be opened this issue Mar 11, 2015 · 9 comments
Assignees
Milestone

Comments

@hy9be
Copy link

hy9be commented Mar 11, 2015

I setup the environment as instructed by the page: http://docs.nativescript.org/setup/ns-cli-setup/ns-setup-os-x.html
And then I try to build the hello world project on nativescript.org: http://docs.nativescript.org/hello-world/hello-world-ns-cli.html. But I was given the error below:

BUILD FAILED
/usr/local/Cellar/android-sdk/24.0.2/tools/ant/build.xml:653: The following error occurred while executing this line:
/usr/local/Cellar/android-sdk/24.0.2/tools/ant/build.xml:698: null returned: 1

Total time: 0 seconds
Command ant failed with exit code 1

@Fatme
Copy link
Contributor

Fatme commented Mar 12, 2015

Hi @hy9be,

Could you try executing $tns build android --log trace and send the output?

@Fatme
Copy link
Contributor

Fatme commented Mar 12, 2015

Could you also send the hardware info of your machine? I experienced such issue on machines with less than 512MB RAM.

@hy9be
Copy link
Author

hy9be commented Mar 12, 2015

Thanks! I will try to collect the log. The machine has 16GB RAM so should be fine in terms of available memory.

@hy9be
Copy link
Author

hy9be commented Mar 13, 2015

Here you go, the build trace:

TypeError: Cannot read property 'isLessThanOrEqualTo' of undefined
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:488:15)
at /usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:15:45
- - - - -
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:488:15)
at /usr/local/lib/node_modules/nativescript/lib/common/dispatchers.js:30:46
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:220:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:487:10)
at /usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:15:45
- - - - -
at Logger.isLevelEnabled (/usr/local/lib/node_modules/nativescript/node_modules/log4js/lib/logger.js:58:20)
at Logger.(anonymous function) as trace
at Logger.trace (/usr/local/lib/node_modules/nativescript/lib/common/logger.js:73:33)
at /usr/local/lib/node_modules/nativescript/lib/common/services/cancellation.js:25:27
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:220:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:487:10)
at /usr/local/lib/node_modules/nativescript/lib/common/dispatchers.js:30:46
at Function.settle (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:220:26)
at FiberFuture.Future.wait (/usr/local/lib/node_modules/nativescript/node_modules/fibers/future.js:487:10)
at /usr/local/lib/node_modules/nativescript/lib/nativescript-cli.js:15:45

@srameshr
Copy link

Even I have the same problem:

Here is my build log.

Starting watch on killswitch /tmp/siddhartha/KillSwitches/cli
AnalyticsInstallationID: 39d7ed3a-2c6a-44ba-b197-7c4fd4262b97
monitor not started
monitor not started
monitor has started, connecting to http://5752dabccfc54c4ab82aea9626b7338e.monitor-eqatec.com/json.ashx
Looking for project in '/home/siddhartha/MyApp'
Project directory is '/home/siddhartha/MyApp'.
spawn: adb version
Project successfully prepared
spawn: ant debug -f /home/siddhartha/MyApp/platforms/android/build.xml
Buildfile: /home/siddhartha/MyApp/platforms/android/build.xml
Statistics was sent successfully (xhr).

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 22.3.0
 [checkenv] Installed at /home/siddhartha/Downloads/android-sdk-linux

-setup:
     [echo] Project Name: MyApp
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.1
     [echo] Resolving Build Target for MyApp...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: /home/siddhartha/MyApp/platforms/android/bin/rsObj
    [mkdir] Created dir: /home/siddhartha/MyApp/platforms/android/bin/rsLibs
     [echo] ----------
     [echo] Resolving Dependencies for MyApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
Statistics was sent successfully (xhr).
[mergemanifest] No changes in the AndroidManifest files.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] /home/siddhartha/MyApp/platforms/android/res/values-v21/styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.

BUILD FAILED
/home/siddhartha/Downloads/android-sdk-linux/tools/ant/build.xml:653: The following error occurred while executing this line:
/home/siddhartha/Downloads/android-sdk-linux/tools/ant/build.xml:698: null returned: 1

Total time: 1 second
Command ant failed with exit code 1

Do I have to install the latest SDK ?

@slavchev
Copy link

Hi all,

This is a known bug in our build logic. Please see the following link http://www.telerik.com/forums/nativescript-cli-build-failed-no-resource-found-that-matches-the-given-name-%27android-theme-material-light%27 for workarounds.

@srameshr
Copy link

I just deleted my sdk folder and trying with the latest sdk. This might take a while!

@hy9be
Copy link
Author

hy9be commented Mar 13, 2015

Thanks! I tried to "replaced on the file "res/values/styles.xml" Theme.Material.Light to Theme.Light". It did work.

@rosen-vladimirov rosen-vladimirov self-assigned this Mar 16, 2015
@dtopuzov dtopuzov added this to the 0.9.2 milestone Mar 16, 2015
rosen-vladimirov added a commit that referenced this issue Mar 16, 2015
In res directory there's values directory that is required for all android versions and directory called values-v21, which is required only for Android version 21. In case you do not have installed latest Android version, this directory should not be added to your project.
Add copyResValues method, which copies res/values directory and res/values-v<version_number> directory to your project. This way when we add directories for other android versions, they will not break builds for older ones.

Fixes #299
@fedmich
Copy link

fedmich commented Mar 26, 2015

Changing from android:Theme.Material.Light to android:Theme.Light worked for me too. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants