You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, thank you for your quick response.
This is my tns info output:
┌──────────────────┬─────────────────┬────────────────┬───────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 2.4.2 │ 2.4.2 │ Up to date │
│ tns-core-modules │ │ 2.4.4 │ Not installed │
│ tns-android │ │ 2.4.1 │ Not installed │
│ tns-ios │ │ 2.4.0 │ Not installed │
└──────────────────┴─────────────────┴────────────────┴───────────────┘
I tried removing and adding the android platform.
Steps to reproduce:
create a simple app
and android platform
run tns prepare android - build successfully
run tns build android - I get this error and another one regarding Execution failed for task ':transformClassesWithDexForF0Debug'., but I posted it into another ticket
@calacianu yes please, I would also suggest that you verify that ANDROID_HOME system property is setup properly, and also that you check the latest installed versions of your SDK platform, and tools in the Android SDK Manager. (android command in a shell/cmd)
Edit: closing the other issue as the two seem to be related to the same problem.
Hey,
the android is ok installed and ANDROID_HOME. I successfully build an app on the same env, but it's very random. one out of 30 apps one work. bellow is the output of the command:
root@nativescript:/home/nativescript/chucky# tns build android
Project successfully prepared (android)
:config phase: createDefaultIncludeFiles
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in /home/nativescript/chucky/platforms/android/configurations folder...
:config phase: pluginExtend
+applying configuration from: /home/nativescript/chucky/platforms/android/configurations/include.gradle
+applying configuration from: /home/nativescript/chucky/platforms/android/configurations/tns-core-modules-widgets/include.gradle
:config phase: copyAarDependencies
:config phase: addAarDependencies
+adding dependency: /home/nativescript/chucky/platforms/android/libs/aar/widgets-release.aar
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preF0DebugBuild UP-TO-DATE
:checkF0DebugManifest
:preF0ReleaseBuild UP-TO-DATE
:prepareChuckyRuntimeUnspecifiedLibrary UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2510Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72510Library UP-TO-DATE
:prepareComAndroidSupportDesign2510Library UP-TO-DATE
:prepareComAndroidSupportRecyclerviewV72510Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2510Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2510Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2510Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2510Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2510Library UP-TO-DATE
:prepareComAndroidSupportSupportV42510Library UP-TO-DATE
:prepareComAndroidSupportSupportVectorDrawable2510Library UP-TO-DATE
:prepareComAndroidSupportTransition2510Library UP-TO-DATE
:prepareWidgetsReleaseLibrary UP-TO-DATE
:prepareF0DebugDependencies
:compileF0DebugAidl UP-TO-DATE
:compileF0DebugRenderscript UP-TO-DATE
:generateF0DebugBuildConfig UP-TO-DATE
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:generateTypescriptDefinitions SKIPPED
:copyTypings SKIPPED
:asbg:generateInterfaceNamesList
:asbg:traverseJsFiles
:asbg:runAstParser UP-TO-DATE
:asbg:generateBindings UP-TO-DATE
:mergeF0DebugShaders UP-TO-DATE
:compileF0DebugShaders UP-TO-DATE
:generateF0DebugAssets UP-TO-DATE
:mergeF0DebugAssets UP-TO-DATE
:generateF0DebugResValues UP-TO-DATE
:generateF0DebugResources UP-TO-DATE
:mergeF0DebugResources UP-TO-DATE
:processF0DebugManifest UP-TO-DATE
:processF0DebugResources UP-TO-DATE
:generateF0DebugSources UP-TO-DATE
:incrementalF0DebugJavaCompilationSafeguard UP-TO-DATE
:compileF0DebugJavaWithJavac UP-TO-DATE
:compileF0DebugNdk UP-TO-DATE
:compileF0DebugSources UP-TO-DATE
:prePackageMarkerForF0Debug
:transformClassesWithDexForF0Debug
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 121 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:myMergeDex
Merged dex #1 (1 defs/1.4KiB)
Merged dex #2 (1 defs/1.5KiB)
Merged dex #3 (1 defs/1.5KiB)
Merged dex #4 (1 defs/2.2KiB)
Merged dex #5 (1 defs/1.6KiB)
Merged dex #6 (1 defs/1.7KiB)
Merged dex #7 (1 defs/1.7KiB)
Merged dex #8 (1 defs/1.4KiB)
Merged dex #9 (1 defs/1.7KiB)
Merged dex #10 (1 defs/1.4KiB)
Merged dex #11 (1 defs/1.7KiB)
Merged dex #12 (1 defs/2.6KiB)
Merged dex #13 (1 defs/1.4KiB)
Merged dex #14 (1 defs/1.4KiB)
Merged dex #15 (1 defs/1.6KiB)
Merged dex #16 (1 defs/1.5KiB)
Merged dex #17 (1 defs/1.6KiB)
Merged dex #18 (1 defs/1.3KiB)
Merged dex #19 (1 defs/1.2KiB)
Merged dex #20 (1 defs/1.3KiB)
Merged dex #21 (1 defs/1.4KiB)
Merged dex #22 (1 defs/1.6KiB)
Merged dex #23 (1 defs/1.7KiB)
Merged dex #24 (1 defs/1.3KiB)
Merged dex #25 (1 defs/1.5KiB)
Merged dex #26 (1 defs/1.4KiB)
Merged dex #27 (1 defs/1.9KiB)
Merged dex #28 (1 defs/1.4KiB)
Merged dex #29 (1 defs/1.3KiB)
Merged dex #30 (1 defs/1.4KiB)
Merged dex #31 (1 defs/1.4KiB)
Merged dex #32 (1 defs/2.3KiB)
Merged dex #33 (1 defs/1.3KiB)
Merged dex #34 (1 defs/1.4KiB)
Merged dex #35 (1 defs/1.6KiB)
Merged dex #36 (1 defs/1.5KiB)
Merged dex #37 (1 defs/1.8KiB)
Merged dex #38 (1 defs/2.0KiB)
Merged dex #39 (1 defs/1.3KiB)
Merged dex #40 (1 defs/1.3KiB)
Merged dex #41 (1 defs/1.4KiB)
Merged dex #42 (1 defs/1.7KiB)
Merged dex #43 (1 defs/1.4KiB)
Merged dex #44 (1 defs/1.3KiB)
Merged dex #45 (1 defs/2.7KiB)
Merged dex #46 (1 defs/1.3KiB)
Merged dex #47 (1 defs/2.5KiB)
Merged dex #48 (2523 defs/3235.4KiB)
Result is 2570 defs/4109.0KiB. Took 1.2s
:buildMetadata FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':buildMetadata'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 137
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2 mins 5.829 secs
Command /home/nativescript/chucky/platforms/android/gradlew failed with exit code 1
@calacianu one thing I noticed is that the build process takes unusually long for a hello-world app. Please execute tns build android --log trace note the --log trace flag, that will output a more verbose log of the build process and probably reveal the underlying build error.
Activity
petekanev commentedon Jan 11, 2017
@calacianu please provide more details regarding your project setup.
What versions of the nativescript CLI, nativescript core-modules and the nativescript android runtime are you using? (tns info)
Are you using any plugins in your projects?
How can we reproduce that crash?
Meanwhile you could try tns platform remove android && tns platform add android before firing up your project the next time and see if that helps.
Thanks!
calacianu commentedon Jan 11, 2017
Hi, thank you for your quick response.
This is my tns info output:
┌──────────────────┬─────────────────┬────────────────┬───────────────┐
│ Component │ Current version │ Latest version │ Information │
│ nativescript │ 2.4.2 │ 2.4.2 │ Up to date │
│ tns-core-modules │ │ 2.4.4 │ Not installed │
│ tns-android │ │ 2.4.1 │ Not installed │
│ tns-ios │ │ 2.4.0 │ Not installed │
└──────────────────┴─────────────────┴────────────────┴───────────────┘
I tried removing and adding the android platform.
Steps to reproduce:
I used no plugins and the OS is Ubuntu 14
Thank you!
calacianu commentedon Jan 11, 2017
would it help to post all the output?
petekanev commentedon Jan 11, 2017
@calacianu yes please, I would also suggest that you verify that
ANDROID_HOMEsystem property is setup properly, and also that you check the latest installed versions of your SDK platform, and tools in the Android SDK Manager. (androidcommand in a shell/cmd)Edit: closing the other issue as the two seem to be related to the same problem.
PS. Make sure you've followed the installation instructions http://docs.nativescript.org/start/ns-setup-linux
calacianu commentedon Jan 11, 2017
Hey,
the android is ok installed and ANDROID_HOME. I successfully build an app on the same env, but it's very random. one out of 30 apps one work. bellow is the output of the command:
petekanev commentedon Jan 11, 2017
@calacianu one thing I noticed is that the build process takes unusually long for a hello-world app. Please execute
tns build android --log tracenote the--log traceflag, that will output a more verbose log of the build process and probably reveal the underlying build error.calacianu commentedon Jan 11, 2017
The output of tns biuld android --log trace:
calacianu commentedon Jan 11, 2017
If you want I can give you access to the server I'm running on :)
petekanev commentedon Jan 11, 2017
@calacianu the logs above suggest Out of Memory issues. Is your
java32 or 64-bit?Please spare a moment to go through http://stackoverflow.com/questions/9808488/how-to-optimize-gradle-build-performance-regarding-build-duration-and-ram-usage and play around with the
-Xms/xparameters. See if anything can alleviate the problems.Switch to everything 64-bit, if it's an option, and try to build an app again.
petekanev commentedon Jan 16, 2017
Hey @calacianu, any update on the matter? Did you manage to build a project successfully?
calacianu commentedon Jan 16, 2017
hey,
sorry I did not post anything. the thing is I was running the app on a digitalocean droplet. I added more ram memory and it worked.
Thank you! :)