Setting up Android IDE: Difference between revisions

From WickyWiki
mNo edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Eclipse]]
[[Category:Java]]
[[Category:Android]]
[[Category:201207]]
See also [[Android Tips and Tricks]]


There are good tutorials to be found for setting up Android IDE:
There are good tutorials to be found for setting up Android IDE:
Line 12: Line 18:


Some optional pointers to improve performance of Eclipse:
Some optional pointers to improve performance of Eclipse:
* modify /opt/eclipse/eclipse.ini increase startup memory:
==modify /opt/eclipse/eclipse.ini increase startup memory==
<syntaxhighlight lang=ini>
<syntaxhighlight lang=ini>
-Xms64m
-Xms64m
</syntaxhighlight>
</syntaxhighlight>


* modify /opt/eclipse/eclipse.ini increase maximum memory:
==modify /opt/eclipse/eclipse.ini increase maximum memory==
<syntaxhighlight lang=ini>
<syntaxhighlight lang=ini>
-Xmx1024m
-Xmx1024m
</syntaxhighlight>
</syntaxhighlight>


* modify /opt/eclipse/eclipse.ini enable use of multiple processors:
==modify /opt/eclipse/eclipse.ini enable use of multiple processors==
<syntaxhighlight lang=ini>
<syntaxhighlight lang=ini>
-XX:-UseParallelGC
-XX:-UseParallelGC
Line 30: Line 36:
</syntaxhighlight>
</syntaxhighlight>


* Use Oracle sun-Java VM 7:
==Use Oracle sun-Java VM 7==
** http://www.duinsoft.nl/packages.php?t=en
 
= Tips and tricks =


* Rotate the Android Virtual Device (AVD) with CTRL+F11/F12
* https://www.digitalocean.com/community/tutorials/how-to-install-java-on-ubuntu-with-apt-get


Debug:
==increase Eclipse auto format line length==
* In AndroidManifest.xml add permission "android.permission.SET_DEBUG_APP"
* Project - Clean


Set target, like 16=4.1.2, 17=4.2.2, 18=4.3 in:
* http://stackoverflow.com/questions/3697287/eclipse-set-maximum-line-length-for-auto-formatting
* modify AndroidManifest.xml
* modify project.properties
* Project - clean


On Ubunto the Javadoc background is black, to chang it can be done at OS level:
In Menu -> Window -> Preferences -> Code Style -> Formatter, edit the profile. Under the Line Wrapping tab is the option for line width. You will need to make your own profile. 120 is a good value.
 
<syntaxhighlight lang=bash>
#backup
sudo cp /usr/share/themes/Ambiance/gtk-3.0/settings.ini /usr/share/themes/Ambiance/gtk-3.0/settings.ini.backup
sudo cp /usr/share/themes/Ambiance/gtk-3.0/gtk.css /usr/share/themes/Ambiance/gtk-3.0/gtk.css.backup
sudo cp /usr/share/themes/Ambiance/gtk-2.0/gtkrc /usr/share/themes/Ambiance/gtk-2.0/gtkrc.backup
 
#foreground white => black
sudo sed -i s/tooltip_fg_color:#ffffff/tooltip_fg_color:#000000/g  /usr/share/themes/Ambiance/gtk-3.0/settings.ini /usr/share/themes/Ambiance/gtk-3.0/gtk.css /usr/share/themes/Ambiance/gtk-2.0/gtkrc
 
#background black => yellow
sudo sed -i s/tooltip_bg_color:#000000/tooltip_bg_color:#f5f5b5/g  /usr/share/themes/Ambiance/gtk-3.0/settings.ini /usr/share/themes/Ambiance/gtk-3.0/gtk.css /usr/share/themes/Ambiance/gtk-2.0/gtkrc
</syntaxhighlight>
 
[[Category:Android]]
[[Category:201207]]

Latest revision as of 20:52, 3 September 2014


See also Android Tips and Tricks

There are good tutorials to be found for setting up Android IDE:

Update: there are complete Eclipse+Android packages that you can unzip and use.

Currently the official guide will use Eclipse 3.6, if you want to use Eclipse 3.7 or later you might want to use this guide:

The official guide tells you to use intall sun java (sun-java6-jdk). As I don't have that installed by default I use openjdk (java-6-openjdk) Additional info:

Some optional pointers to improve performance of Eclipse:

modify /opt/eclipse/eclipse.ini increase startup memory

-Xms64m

modify /opt/eclipse/eclipse.ini increase maximum memory

-Xmx1024m

modify /opt/eclipse/eclipse.ini enable use of multiple processors

-XX:-UseParallelGC
-XX:+AggressiveOpts
-XX:-UseConcMarkSweepGC
-XX:+UseFastAccessorMethods

Use Oracle sun-Java VM 7

increase Eclipse auto format line length

In Menu -> Window -> Preferences -> Code Style -> Formatter, edit the profile. Under the Line Wrapping tab is the option for line width. You will need to make your own profile. 120 is a good value.