Eclipse

Pour rétablir les fenêtres comme à l’origine :

Click on Window in the top nav, then click on Open Perspective, then click on Other, then click on Java EE (or you could use Java). Then click on Window again, and click on Reset Perspective.

Pour réorganiser le code : Ctrl + Shift + F

Pour ajouter automatiquement les imports : Crtl+ Shift + o

Pour fermer les instructions : Ctrl + Espace

Pour renommer un package : Click Droit sur le Package puis Refactore et Rename

Pour insérer du code : Click Droit puis Source et Override/Implement Methods

Si l’importation d’un projet ne fonctionne pas :

(messages d’erreur : Location Type R cannot be resolved to a variable ou the import xxx cannot be found

* Essayez de nettoyer le projet option « clean »,

* Vérifier qu’il n’y a pas de ligne qui s’est ajoutée dans le code « import.R »,

* Vérifier que vous avez bien téléchargé la dernière version de SDK (notamment si vous avez mis à jour Eclipse)

Mise à jour d’ADT  :

  1. In Eclipse go to Help
  2. Install New Software —> Add
  3. inside Add Repository write the Name: ADT (or whatever you want)
  4. Location: https://dl-ssl.google.com/android/eclipse/
  5. after loading you should get Developer Tools and NDK Plugins
  6. check both if you want to use the Native Developer Kit (NDK) in the future or check
  7. Developer Tool only
  8. click Next
  9. Finish

Ajout d’une librairie (fichier jar) dans un projet :

 

  • Download the library to your host development system.
  • Create a new folder, libs, in your Eclipse/Android project.
  • Right-click libs and choose Import -> General -> File System, then Next, Browse in the filesystem to find the library’s parent directory (i.e.: where you downloaded it to).
  • Click OK, then click the directory name (not the checkbox) in the left pane, then check the relevant JAR in the right pane. This puts the library into your project (physically).
  • Right-click on your project, choose Build Path -> Configure Build Path, then click the Libraries tab, then Add JARs…, navigate to your new JAR in the libs directory and add it. (This, incidentally, is the moment at which your new JAR is converted for use on Android.)

 

ERREURS :

1°) Unable to execute dex: Multiple dex files define

  • Right click on the Project Name
  • Select Build Path -> Configure Build Path
  • In Java Build Path, go to the tab Order and Export
  • Uncheck your .jar library

2°) Unable to execute dex: GC overhead limit exceeded

Modifier Eclipse.ini :

openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx1024m

No grammar constraints (DTD or XML schema) detected for the document

In my case I have solved this annoying warning by simply adding the <!DOCTYPE xml> after the <xml? ... > tag.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>

 

 

Laisser un commentaire

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur la façon dont les données de vos commentaires sont traitées.

Articles récents
Commentaires récents
fatima dans Bienvenue !
AdminDroid dans Bienvenue !
fatima dans Bienvenue !
Archives
Catégories