HipByte / Flow

Cross-platform libraries for RubyMotion
BSD 2-Clause "Simplified" License
141 stars 29 forks source link

Unable to launch android #13

Closed jusmat closed 8 years ago

jusmat commented 8 years ago

12 fixed issues with iOS, and it works great, but on Android there are still lots of issues. First of all, building gem doesn't copy vendor folder at all. It results in a error declaring that AndroidManifest.xml is invalid, because it doesn't include package info (it really doesn't cause file does not exist at all). Switching to locally built repo instead of gem results in another error:

ERROR! Unused arguments:{:filter=>["^.com.google.android.gms.vision"]}'. Not sure what exactly this line is about to do, even when deleting it, it results in another errorERROR! app.sdk_path should point to a valid Android SDK directory. Run 'motion android-setup' to install the latest SDK version`. Is there something I'm doing wrong or this part needs some hands to start working as expected? :)

jjaffeux commented 8 years ago

Did you setup android on your machine ? type "motion android-setup" and it should install what you need

Watson1978 commented 8 years ago

I met same error message when I used RubyMotion 4.11, not developing version.

jusmat commented 8 years ago

Maybe it's because I'm using rubymotion-starter? @jjaffeux I can build and run android app with regular rubymotion

Watson1978 commented 8 years ago

I guess this is related to https://github.com/HipByte/Flow/blame/master/lib/android.rb#L41

Watson1978 commented 8 years ago

@jusmat So far, if you revert https://github.com/HipByte/Flow/commit/4cad3f921e9531aa91015140648d577b96d0acac in your local machine, Flow sample will work on Android with your rubymotion-starter env, I think.

$ git revert 4cad3f921e9531aa91015140648d577b96d0acac
$ rake gem
Watson1978 commented 8 years ago

When we will release RubyMotion 4.12, you don't need to apply above workaround.

lrz commented 8 years ago

Yes it's my fault, that commit needs RubyMotion master (which hasn't been released yet).

jusmat commented 8 years ago

Managed to solve previous issues, another one came up

when doing rake android:emulator I'm getting warning:

1: error: constructor FlowUIListViewAdapter() is already defined in class FlowUIListViewAdapter public FlowUIListViewAdapter() { super(); }

I'm not so sure where this file is being generated from, but it definitely has two constructors `import com.rubymotion.*;

public class FlowUIListViewAdapter extends android.widget.BaseAdapter { public FlowUIListViewAdapter() { super(); } public native int getCount(); public native android.view.MenuItem getItem(int arg0); public native long getItemId(int arg0); public native android.view.View getView(int arg0, android.view.View arg1, android.view.ViewGroup arg2); public FlowUIListViewAdapter() { super(); } }`

Watson1978 commented 8 years ago

If you run rake clean or rake clean:all at once, I think probably you can solve your issue.

jjaffeux commented 8 years ago

Closing due to inactivity.