0

完成基本设置后,当我运行 rake install start 时,我只会收到构建成功的消息,除此之外什么都没有。在我旁边运行的模拟器中没有任何东西通电。我刚刚开始使用 ruby​​ 编写 android 应用程序,这只是一个使用 ruboto gen 应用程序生成的入门应用程序。

这是我在运行 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)
4

1 回答 1

0

这是 Ruboto 1.0.3 及更早版本中的错误,仅在部署到 Android 4.4 kitkat 时才会发生。

该错误已在此处修复: https ://github.com/ruboto/ruboto/issues/585

您可以在项目中应用相同的更改来解决此错误。

于 2014-04-06T19:24:58.080 回答