我试图通过命令在我的linux机器上生成ruboto应用程序:
$ ruboto gen app --package org.ruboto.example.quick_start
但是我收到了这个错误:
rake aborted!
Errno::ENOENT: No such file or directory - ant
/opt/projects/quick_start/rakelib/ruboto.rake:14:in ``'
/opt/projects/quick_start/rakelib/ruboto.rake:14:in `<top (required)>'
(See full trace by running task with --trace)
查看完整历史记录:
[chitra@localhost projects]$ ruboto gen app --package org.ruboto.example.quick_start
Generating Android app QuickStart in /opt/projects/quick_start...
Created project directory: quick_start
Created directory /opt/projects/quick_start/src/org/ruboto/example/quick_start
Added file quick_start/src/org/ruboto/example/quick_start/QuickStartActivity.java
Created directory /opt/projects/quick_start/res
Created directory /opt/projects/quick_start/bin
Created directory /opt/projects/quick_start/libs
Created directory /opt/projects/quick_start/res/values
Added file quick_start/res/values/strings.xml
Created directory /opt/projects/quick_start/res/layout
Added file quick_start/res/layout/main.xml
Created directory /opt/projects/quick_start/res/drawable-xhdpi
Created directory /opt/projects/quick_start/res/drawable-hdpi
Created directory /opt/projects/quick_start/res/drawable-mdpi
Created directory /opt/projects/quick_start/res/drawable-ldpi
Added file quick_start/AndroidManifest.xml
Added file quick_start/build.xml
Added file quick_start/proguard-project.txt
Removed file src/org/ruboto/example/quick_start/QuickStartActivity.java
Removed file res/layout/main.xml
Done
Adding RubotoActivity, RubotoDialog, RubotoService, and SDK versions to the manifest...Done.
Generating Android test project QuickStart in /opt/projects/quick_start...
Found main project package: org.ruboto.example.quick_start
Found main project activity: QuickStartActivity
Found main project target: Android 4.1.2
Created project directory: /opt/projects/quick_start/test
Created directory /opt/projects/quick_start/test/src/org/ruboto/example/quick_start
Added file /opt/projects/quick_start/test/src/org/ruboto/example/quick_start/QuickStartActivityTest.java
Created directory /opt/projects/quick_start/test/res
Created directory /opt/projects/quick_start/test/bin
Created directory /opt/projects/quick_start/test/libs
Added file /opt/projects/quick_start/test/AndroidManifest.xml
Added file /opt/projects/quick_start/test/build.xml
Added file /opt/projects/quick_start/test/proguard-project.txt
Done
update_test: target_level: 16
Copying files:
.gitignore...Done.
Rakefile...Done.
ruboto.yml...Done.
assets...Done.
rakelib...Done.
res/layout...Done.
test...Done.
Copying ruboto/version.rb...Done.
Copying additional ruboto script components...Done.
Copying icons...Done.
Ruboto java classes...Done.
Ruboto java test classes...Done.
Loading Android API...Done.
Generating methods for RubotoActivity...Done. Methods created: 61
Generating methods for RubotoService...Done. Methods created: 10
Generating methods for RubotoBroadcastReceiver...Done. Methods created: 1
rake aborted!
Errno::ENOENT: No such file or directory - ant
/opt/projects/quick_start/rakelib/ruboto.rake:14:in ``'
/opt/projects/quick_start/rakelib/ruboto.rake:14:in `<top (required)>'
(See full trace by running task with --trace)
Generating the default Activity and script...Added file /opt/projects/quick_start/src/org/ruboto/example/quick_start/QuickStartActivity.java.
Added file /opt/projects/quick_start/src/quick_start_activity.rb.
Added file /opt/projects/quick_start/test/src/quick_start_activity_test.rb.
Done.
Hello, QuickStart
[chitra@localhost projects]$
任何帮助将不胜感激!
答案 0 :(得分:0)
安装&#34; ant&#34;后,解决了问题。
$ sudo yum install ant