PDA

View Full Version : Sencha packaging to native android problem (javac.exe compiler)



wuytsr
10 Dec 2012, 8:16 AM
Hi,

When I try to package my sencha touch 2 app, I get this error:

Could not run ant with error: 1
Failed to package application
[ERROR]
BUILD FAILED
D:\Data\Documents\Android_SDK\tools\ant\build.xml:705: The following error occurred while executing this line:
D:\Data\Documents\Android_SDK\tools\ant\build.xml:718: Error running javac.exe compiler

This is the whole output of in the cmd:


D:\Data\Documents\TEMPDOCS\sencha>sencha package build config.json
[INFO] Created directory D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\src\com\dlw\WorklistApp
Added file D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\src\com\dlw\WorklistApp\STActivity.java
Created directory D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\res
Created directory D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\bin
Created directory D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\libs
Created directory D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\res\values
Added file D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\res\values\strings.xml
Created directory D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\res\layout
Added file D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\res\layout\main.xml
Added file D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\AndroidManifest.xml
Added file D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\build.xml
Added file D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\proguard-project.txt
Unable to locate tools.jar. Expected to find it in C:\Program Files (x86)\Java\jre6\lib\tools.jar
Buildfile: D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\build.xml

-set-mode-check:

-set-release-mode:

-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}

-check-env:
[checkenv] Android SDK Tools Revision 21
[checkenv] Installed at D:\Data\Documents\Android_SDK

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

-build-setup:
[echo] Resolving Build Target for WorklistApp...
[gettarget] Project Target: Android 2.1
[gettarget] API level: 7
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\bin\res
[mkdir] Created dir: D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\gen
[mkdir] Created dir: D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\bin\classes
[mkdir] Created dir: D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\bin\dexedLibs
[echo] ----------
[echo] Resolving Dependencies for WorklistApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on

-pre-build:

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[renderscript] No RenderScript files to compile.
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
[javac] Compiling 3 source files to D:\Data\Documents\Visual_Studio_2012\Projects\Sap\Sap\build\bin\classes
""D:/Data/Documents/Android_SDK/tools/android" create project --target android-7 --name WorklistApp --activity STActivity --path "D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build/" --package com.dlw.WorklistApp"
Could not run ant with error: 1
Failed to package application
[ERROR]
BUILD FAILED
D:\Data\Documents\Android_SDK\tools\ant\build.xml:705: The following error occurred while executing this line:
D:\Data\Documents\Android_SDK\tools\ant\build.xml:718: Error running javac.exe compiler

Total time: 1 second
Copy operation failed src=ml dst=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build//assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets
/build/assets/build/assets/build/assets/build/AndroidManifest.xml
Copy operation failed src=s.js dst=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build//assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/asse
ts/build/assets/build/assets/build/assets/build/assets/all-classes.js
Copy operation failed src= dst=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build//assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/b
uild/assets/build/assets/build/assets/build/assets/app-all.js
Copy operation failed src=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/a
ssets/build/assets/build/assets/app.jsb3 dst=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build//assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/
build/assets/build/assets/build/assets/build/assets/build/assets/app.jsb3
Copy operation failed src=l dst=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build//assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/
build/assets/build/assets/build/assets/build/assets/bin/Sap.dll
Copy operation failed src=b dst=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build//assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/
build/assets/build/assets/build/assets/build/assets/bin/Sap.pdb
Copy operation failed src=properties dst=D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build//assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/build/assets/buil
d/assets/build/assets/build/assets/build/assets/build/assets/build/ant.properties


The error is at the end. Notice the fact that the path is very long (../build/assets/build/assets...).

This is my configuration file:

{

"applicationName":"WorklistApp",

"applicationId":"com.dlw.WorklistApp",

"versionString":"1.0",

"iconName":"icon.png",

"inputPath":"D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap",

"outputPath":"D:/Data/Documents/Visual_Studio_2012/Projects/Sap/Sap/build",

"configuration":"Release",

"platform":"Android",

"certificatePath":"D:/Data/Documents/TEMPDOCS/sencha/worklistApp-release-key.keystore",

"certificateAlias":"Debug",

"certificatePassword":"*******",

"sdkPath":"D:/Data/Documents/Android_SDK",

"deviceType":"Universal",

"androidAPILevel": 15,

"orientations": [
"portrait",
"landscapeLeft",
"landscapeRight",
"portraitUpsideDown"
]
}

The environment variable with name "JAVA_HOME" has this value: "C:\Program Files\Java\jdk1.7.0_07\bin"

Can someone help me?

Thanks,

R. Wuyts

wuytsr
11 Dec 2012, 4:43 AM
never mind, solved it