1°) Installation des outils :
Pour les familiers du développement sous Android, il est nécessaire d’avoir un environnement de développement opérationnel (cf. page https://andrologiciels.wordpress.com/astuces-android/installation-de-lenvironnement-de-developpement/)
Ensuite, il est nécessaire de télécharger l’Ouya Developpement Kit (ODK) : https://devs.ouya.tv/developers/odk
Dézippez le fichier et placez le dans le répertoire de développement Android (exemple d:\adt).
Assurez vous que vous avez bien téléchargé le package Android 4.1.2 (API 16): SDK Platform (without Google APIs)
et que dans la ligne EXTRA vous avez coché « intel HAXM emulator ». (The Intel x86 Atom System Image and the Intel x86 Emulator Accelerator (HAXM) are recommended)
Pour cela, lancer adt/sdk/sdk Manager.exe et cochez l’installation des package si nécessaire.
2°) Installation du Driver pour Ouya : https://devs.ouya.tv/developers/docs/setup
Pour tester en direct, la console doit être reconnue par votre PC.
You will need to add some paths to PATH. Assuming you put the ADT bundle atC:/Development/adt-bundle-windows-x86_64
,
Open My Computer.
In the left panel, right-click on Computer and choose Properties.
In the left panel of the new window, choose Advanced system settings.
Click the button Environment Variables… in the new window. In the first table (User variables), highlight the row for thePath variable.
Click the Edit… button immediately below the User Variables table.
Append the following to the end of the Variable value field:
;C:/Development/adt-bundle-windows-x86_64/sdk/tools;C:/Development/adt-bundle-windows-x86_64/sdk/platform-tools
Note #1: If the Path variable didn’t already exist, remove the semi-colon at the beginning.
Note #2: You will need to adjust the above paths to match the name of your bundle directory.
Press OK to save your changes.
Press OK to exit the Environment Variables window.
Press OK to exit the Advanced System Settings window.
Sous Windows (Windows 8 users: You will need to disable driver signature verification to install the unsigned Android driver) :
- Open the
ADT Bundle\sdk\extras\google\usb_driver\android_winusb.inf
file. - Add the following lines to the
[Google.NTx86]
and[Google.NTamd64]
sections:;OUYA Console %SingleAdbInterface% = USB_Install, USB\VID_2836&PID_0010 %CompositeAdbInterface% = USB_Install, USB\VID_2836&PID_0010&MI_01
- Important: There should be no carriage return after the hex value. Any blank lines in this file will result in an error. Connect your OUYA to your PC (Micro USB to USB), open Command Prompt (Win+R then type cmd), and run the following commands
adb kill-server echo 0x2836 >> "%USERPROFILE%\.android\adb_usb.ini" adb start-server
- Open the Device Manager (Right-click My Computer->Properties->Device Manager)
- In Device Manager, find Portable Devices\OUYA Console.
- Right-click and choose Update Driver Software…
- Choose Browse my computer for driver software
- Choose Let me pick from a list of device drivers on my computer
- On Windows 8, select All devices and click Next
- Click Have Disk and browse to Android Bundle\sdk\extras\google\usb_driver
- Choose ADB Composite Device The Google device driver is not signed which prevents automatic from finding it.
- Accept the unsigned driverYour console should be shown in the list of available devices
3°) Paramétrage d’un émulateur :
https://github.com/ouya/docs/blob/master/setup.md#software
et http://www.talesofpeople.com/blog/how-setup-ouya-odk
Lancez AVD manager.exe (situé dans le répertoire adt\sdk)
et définissez un matériel émulé du type :
Attention, pour pouvoir utiliser Intel HAXM il faut activer dans le BIOS de votre PC la virtualisation et lancer l’installation de IntelHaxm (programme situé dans le répertoire où le SDK est installé) \extras\intel\Hardware_Accelerated_Execution_Manager
Lancez l’émulateur.
Puis lancez une fenêtre du système d’exploitation (DOS/MAC…) et installez les applications fournies dans le SDK OUYA :
d:\adt\sdk\platform-tools>adb install -r \adt\OUYA-ODK\ouya-framework.apk
186 KB/s (353837 bytes in 1.852s)
pkg: /data/local/tmp/ouya-framework.apk
Success
d:\adt\sdk\platform-tools>adb install -r \adt\OUYA-ODK\ouya-launcher.apk
659 KB/s (8162959 bytes in 12.091s)
pkg: /data/local/tmp/ouya-launcher.apk
Success
L’émulateur affichera alors (après avoir tapé sur le bouton Home) :
4°) importation d’un projet existant :
- Ouvrez Eclipse
- Puis File > New > Project
- Android > Android Project from Existing Code. Click Next
- Cherchez via Import Projects dialog, Browse example,
OUYA-ODK/Samples/game-sample
. - Open.
- Dans Import Projects dialog, click Finish.
Si la OUYA est connectée : Run > Run.
5°) Création d’un programme pour Ouya :
Simplement : File > New > Android Application Project (en version 4.1)
Puis click-droit (dans libs) et ajout des librairies (via import/general/File System) :
> ouya-sdk.jar
> commons-lang-2.6.jar
> guava-r09.jar
Puis modifier le fichier manifest :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tv.ouya.sample"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:targetSdkVersion="16"/>
<supports-screens
android:smallScreens="false"
android:normalScreens="false"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
/>
<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen">
<activity android:name=".IapSampleActivity"
android:label="@string/app_name"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
<category android:name="tv.ouya.intent.category.APP"/>
</intent-filter>
</activity>
</application>
</manifest>
Doc :
https://github.com/ouya/docs/blob/master/setup.md
https://devs.ouya.tv/developers/docs/setup
http://ouyaforum.com/showthread.php?813-OUYA-Emulator-for-Windows-7-and-intel-x86-x64
Votre commentaire