Hi, great steps to follow. I only ran into the following problem: 
"Error:(265, 11) cannot find symbol variable Version"
I think this is due to the JDK that I am using. If so, which JDK should I 
use to compile the project?

Also, I tried the Add Now link and for some projects it keeps saying that 
the folder does not belong to the Gradle project.

Thank you

On Sunday, June 7, 2015 at 8:58:48 PM UTC-5, Karim Virani wrote:
>
>
> Thanks for pushing this forward! With my feedback you get a noob 
> perspective with regard to AS and gradle.  Hopefully this will help you 
> harden your solution against beginner mistakes. I'm also responsible 
> mentoring a couple of high school robotics teams into developing with IOIO 
> and AS. So I'll be pulling more noobs along with me. 
>
> I followed your advice and began with importing the entire software folder 
> as a gradle project.  From there I just accepted any defaults it 
> recommended. It needed a lot of old and/or deprecated android or google 
> APIs downloaded. I had to download API levels 7, 10 and 12.  Perhaps this 
> transition to AS is a good time to update some of the older references 
> scattered throughout the project.  I plan to target a minimum API of 14 or 
> 15 which gets us into ICS and supporting over 95% of all active android 
> phones. By getting us to android 4+ we also get the more robust software 
> fusion sensors that improve motion estimation.  This is helpful in robotics 
> and potentially reduces the number of external sensors required. 
>
> It couldn't build IOIOManager because it's defined as a release build, but 
> (appropriately) you didn't include your keystore properties in the repo:
>
> > Could not find property 'RELEASE_STORE_FILE' on 
> SigningConfig_Decorated{name=r...
>
> I toyed with supplying info for my own keystore, but then thought maybe I 
> shouldn't be building IOIOManager since it's a utility you already publish 
> in Google Play and it isn't really meant to be the foundation of a user 
> app?  So instead I removed:
>  'applications/IOIOManager',
> from the android section in settings.gradle in the software folder.
>
> This allowed gradle to proceed building.
>
> The next hurdle I ran into was a problem with git:
>
> Error:(56) A problem occurred evaluating root project 'software'.
> > Cannot run program "git": CreateProcess error=2, The system cannot find 
> the file specified
>
> As a github for windows user, I was content with using the git shell it 
> provided.  I even had the path to the portable git bin folder configured in 
> AS.  But I think the gradle build wants the system path to be able to find 
> git in the regular cmd shell.
>
> After restarting AS I was able to continue the build and it finally 
> completed the gradle build with only the warning about file encoding 
> settings.
>
> It then popped up a dialog to add a bunch of generated .iml files to git. 
>  I'm not sure if these should be added or gitignored?  I cancelled that 
> dialog.
>
> The AAR files for the main libraries were successfully created!
>
> But none of the android apps were built. If I try running the gradle build 
> for a specific app (either run or debug from within AS), it reports the 
> build is successful but doesn't generate an apk or even create a build 
> folder. It's like it doesn't think it needs to do anything.  
>
> I'm not sure where to go from here.
>
> Thanks for any guidance you can provide.
>
> On Saturday, June 6, 2015 at 12:41:21 AM UTC-5, Ytai wrote:
>>
>> I pushed the current state of my work to GitHub under the 'gradle' branch.
>>
>> Status summary:
>>
>>    - Complete Gradle build support for everything, including generating 
>>    the software release bundle. If you run 'gradle build' from the software 
>>    directory you'll get all the libraries and software apps generated, 
>>    including the AAR you were asking about. 'gradle bundle' would create a 
>> zip 
>>    file in the release directory containing all the artifacts, sample apps, 
>>    javadoc, etc.
>>    - Eclipse support is now not great. All the projects have been 
>>    converted to Gradle projects, but it seems like Eclipse doesn't work 
>>    seamlessly with Gradle, so it is more convenient to build from command 
>> line.
>>    - Haven't yet tried to import into AS, though it should be close to 
>>    trivial now. I recommend importing the entire software directory as one 
>>    project for now. In the future I'll make it simpler.
>>    - Haven't yet uploaded the JAR/AAR to Maven Central, although I 
>>    intend to. At the end of this process it will be fairly easy to write a 
>>    IOIO app from scratch without having to download much or anything at all.
>>    - I can't promise to answer any question you might have about this. 
>>    It is all work in progress still. There's also still no documentation on 
>>    the Wiki yet on how to work with the new stuff. I believe you should be 
>>    fine if you have some experience with AS/Gradle.
>>    - There might be non-compatible changes by the time I actually 
>>    release this. Probably nothing radical though.
>>    - I would highly appreciate any feedback, as most of this stuff is 
>>    new to me and I might have done things in a suboptimal way.
>>
>>
>>
>> On Fri, Jun 5, 2015 at 9:41 AM, Karim Virani <[email protected]> wrote:
>>
>>> Ytai, I'm looking forward to your impending AS support - do you have a 
>>> timeline on it?  Should we be able to build a working app from your gradle 
>>> branch as it is now?
>>>
>>> In the meantime, Egbert, I'd really love to follow your process, but the 
>>> images are not visible to us.  Inspecting the source it looks like you may 
>>> have pasted from a word doc?  Anyhow, the image sources point to files on 
>>> your local windows system, so you are the only one who can see them at the 
>>> moment.  Hope you get a chance to update your writeup.
>>>
>>> Thanks.
>>>
>>> On Thursday, May 28, 2015 at 1:38:50 PM UTC-5, Ytai wrote:
>>>>
>>>> Thanks for sharing that.
>>>> I'm actually in the middle of converting everything to Gradle, then 
>>>> adding AS support and upload packages to Maven, so hopefully your tutorial 
>>>> will not be needed for much longer.
>>>> As for your questions:
>>>>
>>>>    - *android app future.usb.usbmanager not found*: you need to use 
>>>>    the "Google-API" version of the SDK. For example, in my (yet 
>>>> unpublished) 
>>>>    Gradle scripts, I'm building IOIOLibAccessory with compileSdkVersion 
>>>>    "Google Inc.:Google APIs:12".
>>>>    - *my app is says my firmware is incompatible*: This is pretty 
>>>>    self-explaining. Upgrade your firmware...
>>>>    
>>>>
>>>> On Thu, May 28, 2015 at 7:23 AM, Egbert Boer <[email protected]> 
>>>> wrote:
>>>>
>>>>> 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 [email protected].
>>>>> To post to this group, send email to [email protected].
>>>>> Visit this group at http://groups.google.com/group/ioio-users.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>> -- 
>>> 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 [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/ioio-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/ioio-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to