Software Archive
Read-only legacy content

Error MSB6006 when building Native Activity app

Marco_M_2
Beginner
1,148 Views

I'm following the "getting started" tutorial which guides you through setting up an Native Activity android app in Visual Studio (2013). However, when I start the emulator and build the app, I get the following error:

Error	 28	error MSB6006: "C:\Intel\INDE\IDEintegration\ANT\bin\ant.bat" exited with code 9020.	C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Android\Microsoft.Cpp.Android.targets	353	5	HelloWorld

Anyone familiar with this? I can't find anywhere how to solve this.

Hope someone can help me soon :)

Best regards, Marco Maissan

 

0 Kudos
8 Replies
Marco_M_2
Beginner
1,147 Views

Anyone? I'm struggling with this for quite a while now, can't figure out how to get it working..

0 Kudos
Alexander_W_Intel
1,147 Views

Hi,

can you check if your classpath contains a path with spaces which are not surrounded with quotes (")? If this is the case please add the quotes to the classpath by changing the windows environment variable settings. 

If this does not solve the issue, providing the full build log would be helpful. 

Thanks,
Alex

0 Kudos
Marco_M_2
Beginner
1,147 Views

Hello Alex,

Thanks for your reply! I added quotes to the full path, right now it (the path system variable) looks like this:

"C:\Intel\INDE\IDEintegration\SDK\tools";"C:\Intel\INDE\IDEintegration\SDK\platform-tools";"C:\Intel\INDE\media_sdk_6.0.0.349\bin\x64";"C:\Intel\INDE\media_sdk_6.0.0.349\bin\win32";"%INTELOCLPATH%;%INTELOCLSDKROOT%bin\Pin";"%INTELOCLSDKROOT%bin\GTPin";"C:\ProgramData\Oracle\Java\javapath";"C:\Program Files (x86)\Intel\iCLS Client\";"C:\Program Files\Intel\iCLS Client\";"C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common";"%SystemRoot%\system32";"%SystemRoot%";"%SystemRoot%\System32\Wbem";"%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\";"C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\";"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\";"C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\";"C:\Program Files\Microsoft SQL Server\120\Tools\Binn\";"C:\Program Files\Intel\Intel(R) Management Engine Components\DAL";"C:\Program Files\Intel\Intel(R) Management Engine Components\IPT";"C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL";"C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT";"C:\Program Files\nodejs\";"C:\Program Files (x86)\Skype\Phone\";"C:\Program Files (x86)\GtkSharp\2.12\bin";"C:\Intel\INDE\IDEintegration\ANT";"C:\Intel\INDE\IDEintegration\NDK\build\tools";"C:\Intel\INDE\IDEintegration\NDK

And here is my build log:

1>------ Build started: Project: hello-gl2, Configuration: Debug Android ------
1>  Envvar: JAVA_HOME is set to 'C:\Program Files\Java\jdk1.8.0_45'
1>  Envvar: JAVA_OPTS is set to ''
1>  C:\Intel\INDE\IDEintegration\ANT\bin\ant.bat  debug
1>  The system cannot execute the specified program.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Android\Microsoft.Cpp.Android.targets(353,5): error MSB6006: "C:\Intel\INDE\IDEintegration\ANT\bin\ant.bat" exited with code 9020.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

0 Kudos
Alexander_W_Intel
1,147 Views

Hi Marco,

Can you try to open a command line and browse to the directory <solution folder>\AndroidAPK\ and execute: "c:\Intel\INDE\IDEintegration\ANT\bin\ant.bat debug"? Please post the output. 

On an older thread a user had a similar issue and could solve it by renaming an old existing java.exe in windows\system32 . 

Hope this helps!
Alex

0 Kudos
Marco_M_2
Beginner
1,148 Views

http://gyazo.com/f5dbdbba3f94e324162852e4d9d4762a

"Het systeem kan het opgegeven pad niet vinden" means "The system can't find the given path" so I have no path called AndroidAPK in my solution. I do have a file called build.xml in the path "D:\OneDrive\Documenten\Visual Studio 2013\Projects\Test1\Test1\AndroidProject" so that's strange. 

Is it possible do delete all the java sdk's and install the 32 bit version again? Maybe that helps but not sure if that's a smart thing to do. 
Sorry, I'm pretty new to all this stuff. Thanks for your help so far, really appreciate it!

Marco

0 Kudos
Marco_M_2
Beginner
1,148 Views

Okay I'm getting somewhere I think!! I figured out myself that I have multiple versions of the Java SDK installed and that the system variable was pointing to the 64 bit version, which should be the 32 bit version. Now I get the same ant.bat error, exited with code 1 this time. But it looks already way better! So for those who have the same errors, this might be a solution for you :)

Here's my current build log, maybe someone can help solving this with me.

1>------ Build started: Project: Testmhu, Configuration: Debug Android ------
1>  Testmhu.vcxproj -> D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Android\Debug\Testmhu.so
1>  Envvar: JAVA_HOME is set to 'C:\Program Files (x86)\Java\jdk1.8.0_45'
1>  Envvar: JAVA_OPTS is set to ''
1>  C:\Intel\INDE\IDEintegration\ANT\bin\ant.bat  debug
1>  Buildfile: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\build.xml
1>  
1>  -set-mode-check:
1>  
1>  -set-debug-files:
1>  
1>  -check-env:
1>   [checkenv] Android SDK Tools Revision 24.2.0
1>   [checkenv] Installed at C:\Intel\INDE\IDEintegration\SDK
1>  
1>  -setup:
1>       [echo] Project Name: MainActivity
1>    [gettype] Project Type: Application
1>  
1>  -set-debug-mode:
1>  
1>  -debug-obfuscation-check:
1>  
1>  -pre-build:
1>  
1>  -build-setup:
1>  [getbuildtools] Using latest Build Tools: 22.0.1
1>       [echo] Resolving Build Target for MainActivity...
1>  [gettarget] Project Target:   Android 5.0.1
1>  [gettarget] API level:        21
1>       [echo] ----------
1>       [echo] Creating output directories if needed...
1>      [mkdir] Created dir: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin
1>      [mkdir] Created dir: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin\res
1>      [mkdir] Created dir: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin\rsObj
1>      [mkdir] Created dir: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin\rsLibs
1>      [mkdir] Created dir: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\gen
1>      [mkdir] Created dir: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin\classes
1>      [mkdir] Created dir: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin\dexedLibs
1>       [echo] ----------
1>       [echo] Resolving Dependencies for MainActivity...
1>  [dependency] Library dependencies:
1>  [dependency] No Libraries
1>  [dependency] 
1>  [dependency] ------------------
1>       [echo] ----------
1>       [echo] Building Libraries with 'debug'...
1>     [subant] No sub-builds to iterate on
1>  
1>  -code-gen:
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] 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 3 source files to D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\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: D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin\classes
1>        [dex] Converting compiled files and external libraries into D:\OneDrive\Documenten\Visual Studio 2013\Projects\Testmhu\Testmhu\AndroidProject\bin\classes.dex...
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:\Intel\INDE\IDEintegration\SDK\tools\ant\build.xml:892: The following error occurred while executing this line:
1>  C:\Intel\INDE\IDEintegration\SDK\tools\ant\build.xml:894: The following error occurred while executing this line:
1>  C:\Intel\INDE\IDEintegration\SDK\tools\ant\build.xml:906: The following error occurred while executing this line:
1>  C:\Intel\INDE\IDEintegration\SDK\tools\ant\build.xml:283: null returned: 1
1>  
1>  Total time: 11 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Android\Microsoft.Cpp.Android.targets(353,5): error MSB6006: "C:\Intel\INDE\IDEintegration\ANT\bin\ant.bat" exited with code 1.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

__________

EDIT:

__________

Figured this one out as well! Opened the Oracle VM VirtualBox program and changed the heap size with a couple of gigabytes. This did the job, fixed all the errors and now I just - a few minutes ago - succesfully built and ran my first app with the Intel INDE! Very happy I got it working. Hope I can help others with this as well. 

Thanks for the support!

Marco.

0 Kudos
Alexander_W_Intel
1,148 Views

Hi Marco,

thanks for reporting back that you solved it now :-). 

Alex

0 Kudos
Sergio_J__C_
Beginner
1,148 Views

OMG! what is this error? only Visual Studio is happen, use Android Studio

0 Kudos
Reply