经过长时间的努力,我终于使用FlashDevelop编译了针对android的Haxe代码。 我将包含apk文件的bin文件夹复制到我的手机,当我点击apk文件时,“你想安装这个应用程序吗?”显示,但如果我点击安装,没有任何反应,如果我点击取消,安装页面将隐藏。
我在Galaxy S3上尝试过它,android 4.1.2
有什么想法吗?
这是我得到的构建日志:
Building HelloWorld
haxelib run nme build "C:\Users\KETAB\test haxe with android\application.nmml" android
haxelib run hxcpp Build.xml haxe -Dandroid -Dcpp -Dhaxe_208 -Dhaxe_209 -Dhaxe_210 -Dnme -Dnme_install_tool -Dsys -Dtrue
Buildfile: C:\Users\KETAB\test haxe with android\bin\android\bin\build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 21.0.1
[checkenv] Installed at D:\C_Desktop\Development\Android SDK
-setup:
[echo] Project Name: HelloWorld
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-build-setup:
[echo] Resolving Build Target for HelloWorld...
[gettarget] Project Target: Android 2.2
[gettarget] API level: 8
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for HelloWorld...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-pre-build:
-code-gen:
[mergemanifest] Found Deleted Target File
[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] Found Deleted Target File
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 10 source files to C:\Users\KETAB\test haxe with android\bin\android\bin\bin\classes
-post-compile:
-obfuscate:
-dex:
[dex] input: C:\Users\KETAB\test haxe with android\bin\android\bin\bin\classes
[dex] input: D:\C_Desktop\Development\Android SDK\tools\support\annotations.jar
[dex] Using Pre-Dexed annotations-9b179f85f2e5e5c36108e0339b2e749b.jar <- D:\C_Desktop\Development\Android SDK\tools\support\annotations.jar
[dex] Found Deleted Target File
[dex] Converting compiled files and external libraries into C:\Users\KETAB\test haxe with android\bin\android\bin\bin\classes.dex...
[dx] Merged dex A (25 defs/30.3KiB) with dex B (2 defs/1.1KiB). Result is 27 defs/36.0KiB. Took 0.0s
-crunch:
[crunch] Crunching PNG Files in source dir: C:\Users\KETAB\test haxe with android\bin\android\bin\res
[crunch] To destination dir: C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res
[crunch] Processing image to cache: C:\Users\KETAB\test haxe with android\bin\android\bin\res\drawable-hdpi\icon.png => C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-hdpi\icon.png
[crunch] (processed image to cache entry C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-hdpi\icon.png: 0% size of source)
[crunch] Processing image to cache: C:\Users\KETAB\test haxe with android\bin\android\bin\res\drawable-ldpi\icon.png => C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-ldpi\icon.png
[crunch] (processed image to cache entry C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-ldpi\icon.png: 0% size of source)
[crunch] Processing image to cache: C:\Users\KETAB\test haxe with android\bin\android\bin\res\drawable-mdpi\icon.png => C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-mdpi\icon.png
[crunch] (processed image to cache entry C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-mdpi\icon.png: 0% size of source)
[crunch] Processing image to cache: C:\Users\KETAB\test haxe with android\bin\android\bin\res\drawable-xhdpi\icon.png => C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-xhdpi\icon.png
[crunch] (processed image to cache entry C:\Users\KETAB\test haxe with android\bin\android\bin\bin\res\drawable-xhdpi\icon.png: 0% size of source)
[crunch] Crunched 4 PNG files to update cache
-package-resources:
[aapt] Creating full resource package...
[aapt] Warning: AndroidManifest.xml already defines debuggable (in http://schemas.android.com/apk/res/android); using existing value in manifest.
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating HelloWorld-debug-unaligned.apk and signing it with a debug key...
-post-package:
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: C:\Users\KETAB\test haxe with android\bin\android\bin\bin\HelloWorld-debug.apk
[propertyfile] Creating new property file: C:\Users\KETAB\test haxe with android\bin\android\bin\bin\build.prop
[propertyfile] Updating property file: C:\Users\KETAB\test haxe with android\bin\android\bin\bin\build.prop
[propertyfile] Updating property file: C:\Users\KETAB\test haxe with android\bin\android\bin\bin\build.prop
[propertyfile] Updating property file: C:\Users\KETAB\test haxe with android\bin\android\bin\bin\build.prop
-post-build:
debug:
BUILD SUCCESSFUL
Total time: 10 seconds
Build succeeded
Done(0)