2015 mai 17
Premier programme sous Android Studio 1.2.1.1
19:08 - Par Mes Astuces et Bidouilles - Android - Lien permanent
En compilant sous Android studio un programme super simple, il m'affiche une erreur.
Dans activity_main.xml
J'ai suivi ce tuto :
http://www.android-dev.fr/creation_du_premier_projet_et_lancement_de_l_emulateur_android#.VVjCrLweHVN
Dans File => Project Structure => app
Dans Properties :
Compile Sdk version : Api22 Android 5.1
Build tools : 22.0.1
Dans Flavors :
Min Sdk Version : API 19: Android 4.4 (KitKat)
Target Sdk Version : API 19: Android 4.4 (KitKat)
Après bien des recherches, il faut rajouter Base dans App/res/values/styles.xml
Dans activity_main.xml
J'ai suivi ce tuto :
http://www.android-dev.fr/creation_du_premier_projet_et_lancement_de_l_emulateur_android#.VVjCrLweHVN
Dans File => Project Structure => app
Dans Properties :
Compile Sdk version : Api22 Android 5.1
Build tools : 22.0.1
Dans Flavors :
Min Sdk Version : API 19: Android 4.4 (KitKat)
Target Sdk Version : API 19: Android 4.4 (KitKat)
Après bien des recherches, il faut rajouter Base dans App/res/values/styles.xml
Voici le code tel qu'il apparaît :<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>
Et voici la version modifiée :
<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
</style>