Generating AAR file for use in android studio.
I did a small write up for people who want to use IOIO library in android studio.
Open android studio and open a new project.
Application name IOIO
Add no activity.
Select file new module > android library.
Application name and module name : ioio
Add no activity.
Now download the latest package from IOIO website and extract.
Goto \IOIOLib\src\ioio\lib select directorys api, impl, spi, util.
In android studio in the project tree
Drag the selected folders from explorer into android studio in the re.ioio directory.
Next goto IOIOLib\target\android\src\ioio\lib\util select all file and folders inside util.
Drag the selected folder & files from explorer into android studio in the re.ioio\util directory.
Next goto IOIOLib\target\android\src\ioio\lib\spi select all file and folders inside util.
Drag the selected folder & files from explorer into android studio in the re.ioio\spi directory.
Now do the same for the directory: IOIOLibAccessory, IOIOLibAndroidDevice, IOIOLibBT
In IOIOLib\target select target android or pc and drag and drop files in your project tree
Select the ioio top folder int the project tree and right click on it. Select replace in path.
Fill in the fields as shown on the picture, don’t forget to select scope > whole project
A dialog will appear select > all files.
Make sure you have google API installed in the SDK manager.
Now your ready to build. Select Build > Make project.
Your AAR file will be in \IOIO\IOIO\ioio\build\outputs\aar.
How to use the aar file:
In android studio create new project, with blank activity.
Copy the AAR file to \MyApplication\app\libs.
In build.gradle (module) add:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
compile(name:'ioio-debug', ext:'aar')
}
repositories{
flatDir{
dirs 'libs'
}
}
In AndroidManifest.xml add:
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.INTERNET"/>
Library path use re.ioio instead of ioio.lib
Troubles: android app future.usb.usbmanager not found.
the solution is using android.hardware.usb instead of com.android.future.usb
.getInstance(wrapper); not found. In Adapter.java
If i test my app is says my firmware is incompatible. What am i doing wrong here?
--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ioio-users+...@googlegroups.com.
To post to this group, send email to ioio-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.
How so?
The major version of the firmware always needs to be >= major version of IOIOLib. In your case you're using a v5.x IOIOLib with a v4.x firmware.
You received this message because you are subscribed to a topic in the Google Groups "ioio-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ioio-users/Q9RsTm7ic_8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ioio-users+...@googlegroups.com.
project(':HelloIOIO').projectDir = new File('applications/HelloIOIO')