17
Avec le soutien de :

Bootcamp d'Initiation à Android - 2013/11/30 - Live coding : Hello world!

Embed Size (px)

Citation preview

Page 1: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

Page 2: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

LiveCoding : Hello world!0. Installer Android Studio :

http://developer.android.com/sdk/installing/studio.html

Page 3: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

LiveCoding : Hello world!1. Démarrer Android Studio2. Créer une nouvelle application Hello World!

Page 4: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

LiveCoding : Hello world!3. Accepter les options par défaut4. Créer une activité MainActivity

Page 5: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

LiveCoding : Hello world!

Page 6: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

LiveCoding : Hello world!5. Créer un terminal virtuel Android

Page 7: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

LiveCoding : Hello world!6. Exécuter le programme

7. Attendre le boot du terminal

Page 8: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

LiveCoding : Hello world!8. S'extasier devant sa première application Android

Page 9: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

Si je veux utiliser Eclipse ?Des instructions complètes pour ce dans ce Hello World!http://developer.android.com/training/basics/firstapp/index.html

Page 10: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

Page 11: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

J’ai des soucis...Si vous avez la v.0.2.7 d’Android Studio :

● “You must install the Android Support Repository though the SDK Manager”

Page 12: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

“You must install the Android Support Repository… ”

● Démarrer manuellement l’Android Manager android-studio/sdk/tools/android

● Mettre à jour les fichiers Android Support Repository

Page 13: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

“You must install the Android Support Repository… ”

● Copier le SDK vers un répertoire externe cp -r android-studio/sdk /opt/android-sdk

● Configure Project Defaults Project Structure

Page 14: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

“You must install the Android Support Repository… ”

● Nouveau SDK utilisant le repertoire SDK externe

Page 15: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

“You must install the Android Support Repository… ”

● Re-démarrer Android Studio○ Maintenant la création du projet devrait marcher

Page 16: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

J’ai d’autres soucis...Si vous avez la v.0.2.7 d’Android Studio :

● Lors du démarrage de l’émulateur vous obtenez

Gradle: : org.gradle.api.plugins. PluginInstantiationException :

Could not create plugin of type 'AppPlugin'.

Gradle: : java.lang. NoClassDefFoundError :

org/gradle/tooling/provider/model/ ToolingModelBuilderRegistry

...

● Il faut une version de Gradle supérieure à 1.5http://www.gradle.org/

Page 17: Bootcamp d'Initiation à Android  - 2013/11/30 - Live coding :   Hello world!

Avec le soutien de :

L’émulateur est trop grand !Et il déborde de votre écran...

● Allez vers Edit Configurations

● Mettez -scale 0.75 (ou -scale 0.5 si besoin) dansEmulator Additional command line options