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 :
- In Eclipse go to
Help
Install New Software
—>Add
- inside Add Repository write the Name:
ADT
(or whatever you want) - Location:
https://dl-ssl.google.com/android/eclipse/
- after loading you should get Developer Tools and NDK Plugins
- check both if you want to use the Native Developer Kit (NDK) in the future or check
- Developer Tool only
- click Next
- 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 tabOrder 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>
Votre commentaire