Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start generated project on Android #36

Closed
sparkymat opened this issue Jul 30, 2016 · 7 comments
Closed

Unable to start generated project on Android #36

sparkymat opened this issue Jul 30, 2016 · 7 comments
Labels

Comments

@sparkymat
Copy link

sparkymat commented Jul 30, 2016

I created a new project using:

motion create --template=motion-game HelloWorld
cd HelloWorld
rake android:device

I get the following error when it tries to run the app on the device (installation succeeded):

E com/yourcompany/helloworld: Exception raised: NoMethodError: undefined method `start' for #<Class:0x100aa6>

I am using motion-game 1.1.4 with Ruby 2.3.1 on Mac OS X 10.11.6

Edit:

The output of rake android:config is

api_version            : "23"
application_class      : nil
archs                  : ["armv5te", "x86"]
assets_dirs            : ["resources"]
build_dir              : "build/android"
features               : []
files                  : ["./app/application.rb", "./app/main_scene.rb", "/Users/me/ruby-2.3.1/lib/ruby/gems/2.3.0/gems/motion-game-1.1.4/lib/motion-game/android/main_activity.rb"]
icon                   : nil
logs_components        : ["com/yourcompany/helloworld:I", "AndroidRuntime:E", "chromium:E", "dalvikvm:E", "Bundle:E", "art:E"]
main_activity          : "MainActivity"
manifest               : {"xmlns:android"=>"http://schemas.android.com/apk/res/android", "package"=>#<Proc:0x007f9853402548@/Library/RubyMotion/lib/motion/project/template/android/config.rb:145 (lambda)>, "android:versionCode"=>#<Proc:0x007f98534024d0@/Library/RubyMotion/lib/motion/project/template/android/config.rb:147 (lambda)>, "android:versionName"=>#<Proc:0x007f9853402458@/Library/RubyMotion/lib/motion/project/template/android/config.rb:148 (lambda)>}
motiondir              : "/Library/RubyMotion"
name                   : "HelloWorld"
ndk_path               : "/Users/me/.rubymotion-android/ndk"
optional_features      : []
package                : "com.yourcompany.helloworld"
permissions            : []
resources_dirs         : []
sdk_path               : "/Users/me/.rubymotion-android/sdk"
services               : []
specs_dir              : "./spec"
sub_activities         : []
support_libraries      : []
target_api_version     : "24"
theme                  : "@android:style/Theme.Material.Light"
version_code           : "1"
version_name           : "1.0"
@m3ltaw4y
Copy link

I have the exact same issue with the default project. As I believe sparkymat mentioned elsewhere, config/android.rb is missing a line of
app.package = 'com.example'
I corrected this issue, but then ran into the problem described above.

@m3ltaw4y
Copy link

Tried on a few different devices:
Android: 4.4.4 gives a different error:
--------- beginning of main
--------- beginning of system
E/art ( 8478): Failed writing handshake bytes (-1 of 14): Broken pipe
E/art ( 8478): Throwing OutOfMemoryError "PushLocalFrame"
E/com/example( 8478): Java exception raised: java.lang.OutOfMemoryError: PushLocalFrame
Android 5 works correctly without errors.
Android 6 gives the original error (though emulation of Android 6 works properly)

@friendlyuis
Copy link

friendlyuis commented Nov 20, 2016

Hi,

I am experiencing this issue as well, and it's already building with armv7:

api_version : "23"
application_class : nil
archs : ["armv7", "x86"]
assets_dirs : ["./assets", "/Library/RubyMotion/lib/motion/project/template/android/launch_image", "resources"]
build_dir : "build/android"
features : []
files : ["./app/application.rb", "./app/game_scene.rb", "/Library/Ruby/Gems/2.0.0/gems/motion-game-1.1.5/lib/motion-game/android/main_activity.rb"]
icon : nil
logs_components : ["com/yourcompany/flappybird:I", "AndroidRuntime:E", "chromium:E", "dalvikvm:E", "Bundle:E"]
main_activity : "MainActivity"
manifest : {"xmlns:android"=>"http://schemas.android.com/apk/res/android", "package"=>#<Proc:0x007fd92aaa13f0@/Library/RubyMotion/lib/motion/project/template/android/config.rb:145 (lambda)>, "android:versionCode"=>#<Proc:0x007fd92aaa1378@/Library/RubyMotion/lib/motion/project/template/android/config.rb:147 (lambda)>, "android:versionName"=>#<Proc:0x007fd92aaa1300@/Library/RubyMotion/lib/motion/project/template/android/config.rb:148 (lambda)>}
motiondir : "/Library/RubyMotion"
name : "FlappyBird"
ndk_path : "/Users/TLuong/.rubymotion-android/ndk"
optional_features : []
package : "com.yourcompany.flappybird"
permissions : []
resources_dirs : []
sdk_path : "/Users/TLuong/.rubymotion-android/sdk"
services : []
specs_dir : "./spec"
sub_activities : []
support_libraries : []
target_api_version : "25"
theme : "@android:style/Theme.Material.Light"
version_code : "1"
version_name : "1.0"

Any thoughts?

@Watson1978
Copy link
Member

@friendlyuis Unfortunately, I can't reproduce this issue.
Can you tell me more information to reproduce ? (ie, your android device name, etc)

@friendlyuis
Copy link

@Watson1978 it's a samsung s7 edge, what other information do you want?

@Watson1978
Copy link
Member

@friendlyuis Thank you for helpful information!
I will try it with that device.

@Watson1978
Copy link
Member

@friendlyuis filed your issue in #58

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants