完成基本设置后,当我运行rake install start时,我只是获得了构建成功的消息,除此之外什么都没有。在为我运行的模拟器中没有任何东西可以通电。我刚刚开始使用ruby编写Android应用程序,这只是一个使用ruboto gen app生成的入门应用程序。
以下是运行rake install start的原因:
Sid:quick_start SID $ rake install start
/Users/SID/Documents/workspace/android_test/quick_start/src/quick_start_activity.rb changed.
Forcing rebuild of /Users/SID/Documents/workspace/android_test/quick_start/bin/QuickStart-debug.apk.
ant debug
Buildfile: /Users/SID/Documents/workspace/android_test/quick_start/build.xml
-set-mode-check:
-set-debug-files:
-check-env:
[checkenv] Android SDK Tools Revision 22.6.2
[checkenv] Installed at /Users/SID/android-sdk-macosx
-setup:
[echo] Project Name: QuickStart
[gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.3
[echo] Resolving Build Target for QuickStart...
[gettarget] Project Target: Android 4.4.2
[gettarget] API level: 19
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: /Users/SID/Documents/workspace/android_test/quick_start/bin/rsObj
[mkdir] Created dir: /Users/SID/Documents/workspace/android_test/quick_start/bin/rsLibs
[echo] ----------
[echo] Resolving Dependencies for QuickStart...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[echo] ----------
[echo] Building Libraries with 'debug'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] No changes in the AndroidManifest files.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Found new input file
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
[javac] Compiling 1 source file to /Users/SID/Documents/workspace/android_test/quick_start/bin/classes
-post-compile:
-obfuscate:
-dex:
[dex] input: /Users/SID/Documents/workspace/android_test/quick_start/bin/classes
[dex] Found modified input file
[dex] Converting compiled files and external libraries into /Users/SID/Documents/workspace/android_test/quick_start/bin/classes.dex...
-crunch:
[crunch] Crunching PNG Files in source dir: /Users/SID/Documents/workspace/android_test/quick_start/res
[crunch] To destination dir: /Users/SID/Documents/workspace/android_test/quick_start/bin/res
[crunch] Crunched 0 PNG files to update cache
-package-resources:
[aapt] No changed resources or assets. QuickStart.ap_ remains untouched
-package:
[apkbuilder] Found modified input file
[apkbuilder] Creating QuickStart-debug-unaligned.apk and signing it with a debug key...
-post-package:
-do-debug:
[zipalign] Running zip align on final apk...
[echo] Debug Package: /Users/SID/Documents/workspace/android_test/quick_start/bin/QuickStart-debug.apk
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
[propertyfile] Updating property file: /Users/SID/Documents/workspace/android_test/quick_start/bin/build.prop
-post-build:
debug:
BUILD SUCCESSFUL
Total time: 7 seconds
以下是我在dx文件中所做的修改:
# By default, give dx a max heap size of 1 gig. This can be overridden
# by using a "-J" option (see below).
defaultMx="-Xmx2048M"
defaultMx="-Xmx1024M"
这是我设置的avd:
Sid:quick_start SID$ android list avd
Available Android Virtual Devices:
Name: Android_4.4
Path: /Users/SID/.android/avd/Android_4.4.avd
Target: Android 4.4.2 (API level 19)
Tag/ABI: default/x86
Skin: WVGA800
Sdcard: 1000M
如果我做错了,请告诉我。 理想的情况下, rake install start应该让我超越构建成功,例如这样的应用程序应该在模拟器上启动:
adb shell date -s 20131120.102437
Wed Nov 20 10:24:37 EST 2013
Installing package org.ruboto.example.quick_start
pkg: /data/local/tmp/QuickStart-debug.apk
Success
526 KB/s (74474 bytes in 0.138s)
答案 0 :(得分:0)
这是Ruboto 1.0.3及更早版本中的一个错误,只有在部署到Android 4.4 kitkat时才会发生。
此错误已修复:https://github.com/ruboto/ruboto/issues/585
您可以在项目中应用相同的更改来解决此错误。