2012-12-09 45 views
0

未定義我已經重新安裝了兩次操作系統並完成了大約10個小時的調試。我很茫然。運行耙運行時出現錯誤:android(Rhomobile)聲明rm_f對於AndroidTools :: Module

我正在運行Linux Mint 14(所以基本上是Ubuntu),並且得到了運行32位和64位的相同問題。

我開始使用64位,它安裝了32位庫後,得到了與我現在使用32位完全相同的錯誤。

我已經在之前編寫的源代碼(幾個月前工作過)上運行腳本,我也在虛擬源代碼上運行它(只是運行rhogen store,然後將其提供給rake命令)。

如果我搜索這個錯誤,Google上只有一個結果是my post on the rhomobile Google group。既然那還沒有產生任何東西,我想我會在這裏再想一想,看看有沒有人有任何見解。

爲了完整,this是我用於正確安裝Rhodes的指南。 (官方文檔是可怕的!)

下面是從失敗rake run:android堆棧跟蹤:

rm -rf /media/radnadz/Methuselah/Programming/Rhodes/store/bin/target/android/store-tmp.apk 
** Execute run:android:emulator 
rake aborted! 
undefined method `rm_f' for AndroidTools:Module 
/var/lib/gems/1.9.1/gems/rhodes-3.5.1.12/platform/android/build/android_tools.rb:211:in `run_emulator' 
/var/lib/gems/1.9.1/gems/rhodes-3.5.1.12/platform/android/build/android.rake:1971:in `block (3 levels) in <top (required)>' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:227:in `call' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:227:in `block in execute' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:222:in `each' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:222:in `execute' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:166:in `block in invoke_with_call_chain' 
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:159:in `invoke_with_call_chain' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/task.rb:152:in `invoke' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:141:in `invoke_task' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in `block (2 levels) in top_level' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in `each' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:99:in `block in top_level' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:108:in `run_with_threads' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:93:in `top_level' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:71:in `block in run' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:158:in `standard_exception_handling' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/lib/rake/application.rb:68:in `run' 
/var/lib/gems/1.9.1/gems/rake-10.0.2/bin/rake:37:in `<top (required)>' 
/usr/local/bin/rake:23:in `load' 
/usr/local/bin/rake:23:in `<main>' 
Tasks: TOP => run:android:emulator 

回答

3

答案很煩人簡單(如果你知道去哪裏找)。

由於堆棧跟蹤提示,問題源自/var/lib/gems/1.9.1/gems/rhodes-3.5.1.12/platform/android/build/android_tools.rb的第211行。

如果將行從rm_f $applog_path if !$applog_path.nil?更改爲FileUtils.rm_f $applog_path if !$applog_path.nil?,則問題已解決。

感謝Alexey對rhomobile Google Group的解決方案!