Tuesday, April 24, 2012

List of devices attached ???????????? no permissions

Solution :



cd android-sdk-linux-linux/tools
su or sudo su
./adb kill-server
./adb start-server
./adb devices

OR

cd andriod-sdks  ( This might be at your home directory )


cd platform-tools
sudo su
./adb kill-server
./adb start-server
./adb devices



Monday, April 23, 2012

Installing Eclipse 3.7 on Linux

1) Download Eclipse. I got eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
2) Extract it
tar xzf eclipse-SDK-3.7-linux-gtk-x86_64.tar.gz
Or just be lazy and Right Click > Extract Here
3) Move to /opt/ folder
mv eclipse /opt/
sudo chown -R root:root eclipse
sudo chmod -R +r eclipse
4) Create an eclipse executable in your path
sudo touch /usr/bin/eclipse
sudo chmod 755 /usr/bin/eclipse
sudo nano /usr/bin/eclipse
copy this into nano
#!/bin/sh
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
export ECLIPSE_HOME="/opt/eclipse"

$ECLIPSE_HOME/eclipse $*
save the file (^O = Ctrl+o) and exit nano (^X = Ctrl+x)
5) Create a gnome menu item
sudo nano /usr/share/applications/eclipse.desktop
copy this into nano
[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=/opt/eclipse/icon.xpm
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true
save and exit nano
6) Launch Eclipse for the first time
/opt/eclipse/eclipse -clean &

Installing Java on Linux

Download java from here
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7u3-download-1501626.html


Install the JDK

  • Download he 32bit or 64bit Linux "compressed binary file" - it has a ".tar.gz" file extension i.e. "[java-version]-i586.tar.gz" for 32bit and "[java-version]-x64.tar.gz" for 64bit
  • Uncompress it
    tar -xvf jdk-7u2-linux-i586.tar.gz (32bit)
    tar -xvf jdk-7u2-linux-x64.tar.gz (64bit)
JDK 7 package is extracted into ./jdk1.7.0_02 directory. - Now move the JDK 7 directory to /usr/lib
sudo mv ./jdk1.7.0_02 /usr/lib/jvm/jdk1.7.0
  • Now run
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
  • Run
sudo update-alternatives --config java
You will see output similar one below - choose the number of jdk1.7.0 - for example 3 in this list:
$sudo update-alternatives –config java
There are 3 choices for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
————————————————————
* 0 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 auto mode
1 /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode
2 /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode
3 /usr/lib/jvm/jdk1.7.0/jre/bin/java 3 manual mode

Press enter to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/lib/jvm/jdk1.7.0/jre/bin/java to provide /usr/bin/java (java) in manual mode.
Check the version of you new JDK 7 installation:
java -version
java version “1.7.0”
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode) 
Repeat the above for:
sudo update-alternatives --config javac
sudo update-alternatives --config javaws
Enable mozilla firefox plugin:
32 bit:
ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libnpjp2.so ~/.mozilla/plugins/

64 bit:
ln -s /usr/lib/jvm/jdk1.7.0/jre/lib/amd64/libnpjp2.so ~/.mozilla/plugins/

requires 'org.eclipse.core.runtime 3.6.0' but it could not be found

Hi

I face this problem while installing ADT Plugin for Eclipse .

Solution :

Using Eclipse 3.7 .

1) Simply go to "Help -> Install New Software" and add an entry http://download.eclipse.org/releases/indigo.

2) Then install the package with the name of web something (sorry i forget the name but know that it has web word)

3) After installing that  , go and download the ADT Plugin http://developer.android.com/sdk/eclipse-adt.html and then

4) Repeat step 1 with  title "ADT Plugin" and click on archive button and select the zip file which you downloaded (ADT Plugin)

5)Install