gavinpugh / vs-android

Integrated development of Android NDK C/C++ software with Microsoft Visual Studio.
Other
120 stars 34 forks source link

Ant exited with code 1 #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,
I have problem with error, which looks like this:
C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Android\Microsoft.Cpp.Android.Targets
(276,5): error MSB6006: "c:\apache-ant-1.9.4\bin\ant.bat" exited with code 1.

I've already tried to reintall JDK and searched for more info in google, but 
nothing works for me.
If it helps, i use Windows 7 x64, VS2010, and everything (sdk, jdk etc.) is 32 
bit.
Whole log looks like this:
1>------ Build started: Project: san-angeles, Configuration: Release Android 
------
1>  app-android.c
1>  demo.c
1>  importgl.c
1>  san-angeles.vcxproj -> C:\san-angeles\Android\Release\san-angeles.so
1>  Envvar: JAVA_HOME is set to 'C:\Program Files (x86)\Java\jdk1.8.0_11'
1>  Envvar: JAVA_OPTS is set to ''
1>  c:\apache-ant-1.9.4\bin\ant.bat  release
1>  Buildfile: C:\san-angeles\AndroidApk\build.xml
1>  
1>  -set-mode-check:
1>  
1>  -set-release-mode:
1>  
1>  -release-obfuscation-check:
1>       [echo] proguard.config is ${proguard.config}
1>  
1>  -pre-build:
1>  
1>  -check-env:
1>   [checkenv] Android SDK Tools Revision 23.0.2
1>   [checkenv] Installed at c:\sdk\sdk
1>  
1>  -setup:
1>       [echo] Project Name: DemoActivity
1>    [gettype] Project Type: Application
1>  
1>  -build-setup:
1>  [getbuildtools] Using latest Build Tools: 20.0.0
1>       [echo] Resolving Build Target for DemoActivity...
1>  [gettarget] Project Target:   Android 2.2
1>  [gettarget] API level:        8
1>       [echo] ----------
1>       [echo] Creating output directories if needed...
1>      [mkdir] Created dir: C:\san-angeles\AndroidApk\bin\rsObj
1>      [mkdir] Created dir: C:\san-angeles\AndroidApk\bin\rsLibs
1>       [echo] ----------
1>       [echo] Resolving Dependencies for DemoActivity...
1>  [dependency] Library dependencies:
1>  [dependency] No Libraries
1>  [dependency] 
1>  [dependency] ------------------
1>  [dependency] API<=15: Adding annotations.jar to the classpath.
1>       [echo] ----------
1>       [echo] Building Libraries with 'release'...
1>     [subant] No sub-builds to iterate on
1>  
1>  -code-gen:
1>  [mergemanifest] Found Deleted Target File
1>  [mergemanifest] Merging AndroidManifest files into one.
1>  [mergemanifest] Manifest merger disabled. Using project manifest only.
1>       [echo] Handling aidl files...
1>       [aidl] No AIDL files to compile.
1>       [echo] ----------
1>       [echo] Handling RenderScript files...
1>       [echo] ----------
1>       [echo] Handling Resources...
1>       [aapt] Found Deleted Target File
1>       [aapt] Generating resource IDs...
1>       [echo] ----------
1>       [echo] Handling BuildConfig class...
1>  [buildconfig] Generating BuildConfig class.
1>  
1>  -pre-compile:
1>  
1>  -compile:
1>      [javac] Compiling 2 source files to 
C:\san-angeles\AndroidApk\bin\classes
1>ANTBUILD : [javac] warning : [options] source value 1.5 is obsolete and will 
be removed in a future release
1>ANTBUILD : [javac] warning : [options] target value 1.5 is obsolete and will 
be removed in a future release
1>ANTBUILD : [javac] warning : [options] To suppress warnings about obsolete 
options, use -Xlint:-options.
1>      [javac] 3 warnings
1>  
1>  -post-compile:
1>  
1>  -obfuscate:
1>  
1>  -dex:
1>        [dex] input: C:\san-angeles\AndroidApk\bin\classes
1>        [dex] input: c:\sdk\sdk\tools\support\annotations.jar
1>        [dex] Pre-Dexing c:\sdk\sdk\tools\support\annotations.jar -> 
annotations-5ebc5b3e0f38ac9c3025bb528fc900a0.jar
1>         [dx] Error occurred during initialization of VM
1>         [dx] Could not reserve enough space for 1048576KB object heap
1>  
1>  BUILD FAILED
1>  c:\sdk\sdk\tools\ant\build.xml:892: The following error occurred while 
executing this line:
1>  c:\sdk\sdk\tools\ant\build.xml:894: The following error occurred while 
executing this line:
1>  c:\sdk\sdk\tools\ant\build.xml:906: The following error occurred while 
executing this line:
1>  c:\sdk\sdk\tools\ant\build.xml:283: null returned: 1
1>  
1>  Total time: 3 seconds
1>C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Android\Microsoft.Cpp.Android.Targets
(276,5): error MSB6006: "c:\apache-ant-1.9.4\bin\ant.bat" exited with code 1.
2>------ Skipped Deploy: Project: san-angeles, Configuration: Release Android 
------
2>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 1 skipped ==========

Original issue reported on code.google.com by kojote...@gmail.com on 22 Jul 2014 at 7:58

GoogleCodeExporter commented 9 years ago
Take a look here:
https://code.google.com/p/vs-android/wiki/Troubleshooting#[apply]_Could_not_crea
te_the_Java_virtual_machine.

I'd imagine this is the same problem. The error is a little different. I added 
the error from your output to that wiki page.

Original comment by gavin.dj.pugh on 23 Jul 2014 at 6:38

GoogleCodeExporter commented 9 years ago
I've tried 256, 512, 1024 and 2048 values, for first 2 everything looks same, 
but on second 2 it crashes at the beginning:
1>------ Build started: Project: san-angeles, Configuration: Release Android 
------
1>  Envvar: JAVA_HOME is set to 'C:\Program Files (x86)\Java\jdk1.8.0_11'
1>  Envvar: ANT_OPTS is set to '-Xms512m -Xmx1024m'
1>  Envvar: JAVA_OPTS is set to ''
1>  c:\apache-ant-1.9.4\bin\ant.bat  release
1>  Error occurred during initialization of VM
1>  Could not reserve enough space for 1048576KB object heap
1>C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\Platforms\Android\Microsoft.Cpp.Android.Targets
(276,5): error MSB6006: "c:\apache-ant-1.9.4\bin\ant.bat" exited with code 1.
2>------ Skipped Deploy: Project: san-angeles, Configuration: Release Android 
------
2>Project not selected to build for this solution configuration 
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 1 skipped ==========

Alternative solution does nothing as well. Maybe its my hardware problem?

Original comment by kojote...@gmail.com on 23 Jul 2014 at 7:32