2

我对 Kony 很陌生,并且遇到了构建错误。第一次使用选定的平台构建我的项目时 Android ,它给了我以下错误。

buildwar:

all:
[02-12-2014 10:30:51]Time taken for Preprocessing code for selected platforms : 2432
[02-12-2014 10:30:51]Success : Preprocessing code for selected platforms
[02-12-2014 10:30:51]Starting Build Generation Process for Job: Android
[02-12-2014 10:30:51]Performing Android build
[02-12-2014 10:30:51][02-12-2014 10:30:51]Executing build file: D:\KonyWorkspace/temp/KonyEx\build\luaandroid/build.xml

init:

copyjar:
    [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist
    [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx
    [unjar] Expanding: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\codegen.jar into D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx

copybuildfile:
     [copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx

copyextlibs:
     [echo] Copying extlibs ... dev.language = js
     [copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\libs\armeabi

gen:
     [echo] Building android source code
     [echo] The value of packagename is com.orgname.KonyEx
     [echo] Creating package path: D:\KonyWorkspace\temp\KonyEx\build\luaandroid/dist/KonyEx/src/com//orgname//KonyEx
    [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\orgname\KonyEx
     [move] Moving 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\orgname\KonyEx

cleanmapv2:
     [echo]  usegoogleplaylocationservices: false 
     [echo] mapv2keyadded in application tags = false
     [echo] The value of googlemapv2key is empty
     [echo]  MapV2 Metadata-Key:  
     [echo]  MapV2 Permissions:  
   [delete] Deleting: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\PROVIDER.java
   [delete] Deleting: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\res\xml\searchable.xml
     [echo] The value of andmanifesttags is 
     [echo] The value of andapplicationtags is 
     [echo] Min SDK version: android:minSdkVersion ="9" 
     [echo] Max SDK version:  
     [echo] Target SDK version: android:targetSdkVersion="9" 
     [echo]  Push Notification Permissions:  
     [echo]  Push Notification Intent Filters:  
     [echo]  Push Notification Intent Receiver:  
     [echo] Any Density: android:anyDensity ="true"
     [echo] Small Screen: android:smallScreens ="true" 
     [echo] Normal Screen: android:normalScreens ="true"
     [echo] Large Screen: android:largeScreens ="true" 
     [echo] xLarge Screen: android:xlargeScreens ="true" 
     [echo] Resizable: 
     [echo] Install location value defined:auto
     [echo] Permissions set:
     [echo]  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
     [echo]  <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
     [echo]  <uses-permission android:name="android.permission.INTERNET"/>

copyassets:
     [echo] Copying the resources to android assets
     [copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets

copy-appsrc:

copy-appsrc-to-assets-zip:
    [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets\js
      [zip] Building zip: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets\js\startup.js

copy-PaaS-resources:
    [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\konylabs\js\appsrc
     [copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\src\com\konylabs\js\appsrc
    [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets\fonts
     [echo] Copying theme files
     [copy] Copying 1 file to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\assets

copynativeresources:
     [echo] Copying the native resources to android assets

copyninepatchimages:
     [echo] Copying the nine patch images and delete the actual png image in android drawable folder

check-for-actual-png-file:

check-for-actual-png-file:
     [echo] No 3rd party libraries found
     [echo] No custom widget libraries found

compile:
     [echo] Packaging the android KonyEx application
[exec-shell] Buildfile: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\build.xml
[exec-shell] 
[exec-shell] -set-mode-check:
[exec-shell] 
[exec-shell] -set-debug-files:
[exec-shell] 
[exec-shell] -check-env:
[exec-shell]  [checkenv] Android SDK Tools Revision 20
[exec-shell]  [checkenv] Installed at D:\Kony\android-sdk
[exec-shell] 
[exec-shell] -setup:
[exec-shell]      [echo] Project Name: KonyEx
[exec-shell]   [gettype] Project Type: Application
[exec-shell]      [echo] Switching between debug and non debug build: Deleting previous compilation output...
[exec-shell] 
[exec-shell] -set-debug-mode:
[exec-shell] 
[exec-shell] -debug-obfuscation-check:
[exec-shell] 
[exec-shell] -build-setup:
[exec-shell]      [echo] Resolving Build Target for KonyEx...
[exec-shell] [gettarget] Project Target:   Android 2.3.1
[exec-shell] [gettarget] API level:        9
[exec-shell]      [echo] ----------
[exec-shell]      [echo] Creating output directories if needed...
[exec-shell]     [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin
[exec-shell]     [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\res
[exec-shell]     [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\gen
[exec-shell]     [mkdir] Created dir: D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\classes
[exec-shell]      [echo] ----------
[exec-shell]      [echo] Resolving Dependencies for KonyEx...
[exec-shell] [dependency] Library dependencies:
[exec-shell] [dependency] No Libraries
[exec-shell] [dependency] 
[exec-shell] [dependency] ------------------
[exec-shell] [dependency] API<=15: Adding annotations.jar to the classpath.
[exec-shell]      [echo] ----------
[exec-shell]      [echo] Building Libraries with 'debug'...
[exec-shell]    [subant] No sub-builds to iterate on
[exec-shell] 
[exec-shell] -pre-build:
[exec-shell] 
[exec-shell] -code-gen:
[exec-shell] [mergemanifest] Merging AndroidManifest files into one.
[exec-shell] [mergemanifest] Manifest merger disabled. Using project manifest only.
[exec-shell]      [echo] Handling aidl files...
[exec-shell]      [aidl] No AIDL files to compile.
[exec-shell]      [echo] ----------
[exec-shell]      [echo] Handling RenderScript files...
[exec-shell] [renderscript] No RenderScript files to compile.
[exec-shell]      [echo] ----------
[exec-shell]      [echo] Handling Resources...
[exec-shell]      [aapt] Generating resource IDs...
[exec-shell]      [echo] ----------
[exec-shell]      [echo] Handling BuildConfig class...
[exec-shell] [buildconfig] Generating BuildConfig class.
[exec-shell] 
[exec-shell] -pre-compile:
[exec-shell] 
[exec-shell] -compile:
[exec-shell]     [javac] Compiling 4 source files to D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\classes
[exec-shell] 
[exec-shell] -post-compile:
[exec-shell] 
[exec-shell] -obfuscate:
[exec-shell] 
[exec-shell] -dex:
[exec-shell]       [dex] Converting compiled files and external libraries into D:\KonyWorkspace\temp\KonyEx\build\luaandroid\dist\KonyEx\bin\classes.dex...
[exec-shell]        [dx] 'C:\Program' is not recognized as an internal or external command,
[exec-shell]        [dx] operable program or batch file.
[exec-shell] 
[exec-shell] BUILD FAILED
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:851: The following error occurred while executing this line:
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:853: The following error occurred while executing this line:
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:865: The following error occurred while executing this line:
[exec-shell] D:\Kony\android-sdk\tools\ant\build.xml:266: null returned: 1
[exec-shell] 
[exec-shell] Total time: 5 seconds
[02-12-2014 10:30:59]Ant build error=exec-shell returned: 1
[02-12-2014 10:30:59]Build Generation failed for platform Android.
[02-12-2014 10:30:59]Total time taken: 23110 ms
[02-12-2014 10:30:59]Build Generation has failed for the following platforms:-->Android
[02-12-2014 10:30:59]<-----------Build Generation job is completed--------------->

这些是我的环境变量。

JAVA_HOME = C:\Program Files\Java\jdk1.6.0_32 
ANT_HOME = C:\Kony\Ant 
Path = C:\Kony\ImageMagick;C:\Kony\Ant\bin;D:\Kony\android-sdk\platform-tools;D:\Kony\android-sdk\tools;C:\Program Files\Java\jdk1.6.0_32\bin; 

我已经正确设置了 Android 路径。你能帮我看看有什么问题吗?如果您需要任何其他信息,也请告诉我。

4

1 回答 1

0

所以有几件事:

  1. 看起来您的路径在 JAVA_HOME 变量的结尾和 ANT_HOME 变量的开头之间缺少分号,这可能会导致您出现问题。您可能想在此处尝试应用快速环境编辑器来帮助配置您的 PATH。 http://www.rapidee.com/en/about

  2. 假设这是一个错字,您可能想尝试卸载 Java 并将其重新安装到您的根目录中,例如 C:\JAVA。

  3. 我同意在你的路径周围加上引号可能会有所帮助(同样,像环境编辑器这样的工具会自动处理这样的事情,让你的生活更轻松)

试试这些,让我们知道!

于 2014-02-13T00:00:59.797 回答