Just tried to make first Android application with Rubymotion, and stuck with AAR libraries. I don't have experience with Android development at all.
I want to include Facebook SDK into the app. I've added next into Manifest:
app.manifest_entry('application', 'meta-data', :name => 'com.facebook.sdk.ApplicationId', :value => '@string/facebook_app_id')
Now I wanted to actually add the library into the project. I tried using
app.gradle do end
It installed SDK, I can see it in
Gradle/dependencies folders. I also can see that it installed all Facebook SDK dependencies, so it seemed to work well.
But when I try to use Facebook SDK in my code, app crashes with:
<NameError: uninitialized constant 'FacebookSdk'>
The only thing I added in MainActivity is:
I noticed that
motion-gradle has a "clunky .aar support", and I tried to unzip Facebook SDK (it's an AAR library), and use it as a
app.vendor_project :jar => "vendor/facebook/classes.jar",
:resources => "vendor/facebook/res",
:manifest => "vendor/facebook/AndroidManifest.xml"
I had to install some dependencies manually (like CardView).
Unfortunately it did not help, it still crashes with
<NameError: uninitialised constant 'FacebookSdk'>
Am I missing something? Is there a way to use Facebook SDK with rubymotion-android?