Android2EE

  • Adapté
  • Large
  • Etroit
  • Augmenter la taille de la police
  • Taille de la police par défaut
  • Diminuer la taille de la police
Prochaines formations Android inter-entreprises par Android2EE

Inscrivez-vous.

Inscrivez-vous dès maintenant.
N'attendez pas que les formations soient remplies (8 places maximum).

par mail : contact@android2ee.com ou

par téléphone 06 50 48 24 93. 
Du 24 au 28 Juin
Du 23 au 27 Sept.
Du 18 au 22 Nov. 
Paris  Formation Init.: Des fondamentaux à l'autonomie et la performance (3j)
Formation complète: Fondamentaux, Architecture et Android 4 (5j) 
Du 07 au 11 Oct.  Lyon Formation Init.: Des fondamentaux à l'autonomie et la performance (3j)
Formation complète : Fondamentaux, Architecture et Android 4 (5j) 
Du 16 au 20 Sept.
Du 25 au 29 Nov.
 

Toulouse
Formation Init.: Des fondamentaux à l'autonomie et la performance (3j)
Formation complète : Fondamentaux, Architecture et Android 4 (5j) 
La conférence "Android a Quick Course" est disponible, n'hésitez pas à la visionner. ici

Participez aux formations Android2EE et gagnez peut-être le Nexus (plus d'informations)

Lancement dès Octobre 2013 de la fromation Android 4+ dédiée à HoneyComb, IceCreamSandwich et JellyBean. Stay Tuned

Bienvenue, Invité
Username: Password: Se souvenir de moi
Welcome. To read first.
  • Page:
  • 1

SUJET: Trouble with the Ultimate Maven POM,solutions here

Trouble with the Ultimate Maven POM,solutions here 1 year 6 months ago #23

  • mseguy
  • mseguy's Avatar
  • Hors ligne
  • Administrateur
  • Message: 18
  • Thank you received 2
  • Karma: 1
:blush:
Chapter 15.2.1.1: Do it using the downlaoadable generic Android project.
p245-246
About the Ultimate Android POM, I use the jar yesterday and suprise, it doesn't work... arg what a f...k !
So i look at it, and, nop, the pom is correct, there is just few stuff to look further and to explain much more :

/!\ Warning/!\
When importing the project within Eclipse, the project's classpath is changed by eclipse, you have to set it back to this classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>



Furthermore, during this bug hunt, i also notice that some lines in the how to section has to be added (in bold what is missing):
  • -Import then project into Eclipse (the parent project) by using « import an existing maven project ».


  • -Perform a « search and replace » of :


  • o « com.android2ee.android.tuto.maven » swap it for the GroupId of your project


  • o « AndroidGenericProject » swap it for the ArtifactId of your project


  • -Rename the packages' name accordingly in the project **-ap et **-it (that still looks like com.android2ee.android.tuto.maven)


  • -Delete then re-import the project into the Eclipse workspace (the parent project) using « import an existing maven project ».


  • -Do a right clic on the project **-ap and in the menu choose Maven->UpdateProjectConfiguration


  • -Do a right clic on the project **-it and in the menu choose Maven->UpdateProjectConfiguration


  • -Copy the contents of the setting.xml file found at the root of the parent project within your own setting.xml file (the one of your workstation, the one used by Maven when building your project). In the file setting.xml, you have to add the AVD that you curently use. To do that, in the following piece of code:

    <profile>
    			<id>AVD-Google3</id>
    			<properties>
    				<!--The path to the Android SDK-->
    				<avd-name>Google3</avd-name>
    			</properties>
    		</profile>
    You have to change the id by the id of your own AVD and the avd-name by the real name of your AVD (the one displayed in the AVD manager of Eclipse).
    Then you have to define which AVD is your default AVD, this definition is done at the top of the setting file. To do that, change the following block:
    <activeProfiles>
    		<activeProfile>android-project</activeProfile>
    		<activeProfile>[i]AVD-Google10[/i]</activeProfile>
    	</activeProfiles>
    And instead of AVD-Google10 you have to set the id of your own default AVD.


  • -If needed, change the version numbers in the Pom file of the parent project and update the path values in the setting.xml file.


  • -In the manifest, change the minimum SDK version that you wish to use : : <uses-sdk android:minSdkVersion="3" />


  • -Change in the both files default.properties the version of the target project. You have to put the value of your minSdkVersion (above modified)

    # Project target.

    target=android-7

    And set the same level number intead of the seven.


  • -Check your projects' classpath have not change (the above warning)


  • -Perform a cleaning operation (RunAs->maven Clean)


  • -Your project is now operational and ready for continuous integration.


  • Mathias Séguy
    mathias.seguy.it@gmail.com
    Auteur Android2ee.com
    Docteur en Mathématiques Fondamentales
    Directeur Technique & Avant-vente
    Expert Technique de l'Agence Nationale de la Recherche
    Rédacteur sur Developpez.com
    Dernière édition: 1 year 6 months ago par mseguy.
    L'administrateur à désactivé l'accès en écriture pour le public.
    • Page:
    • 1
    Time to create page: 1.027 seconds
    Vous êtes ici Forum Forums Adhérents About the Ebooks, their Download and the Errata. Trouble with the Ultimate Maven POM,solutions here