Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

Android Emulator not starting on ubuntu - Android studio

If you are using Android studio on ubuntu there are can be number of reasons why Android studio cant  start an instance of AVD. Emulator is a one needy insane bugger you always want to work with and you have to tolerate with.  Here the focus is on a specific issue of

"PANIC: HOME is defined but could not find TESTPHONE.ini file in $HOME\.android\avd
(Note: avd is searched in the order of $ANDROID_AVD_HOME,$ANDROID_SDK_HOME\.android\avd and $HOME\.android\avd)"

Normally what happens in Ubuntu is you either download Android Studio + Open JDK or Orcale JDK via bash or you download the zip files and install java and install Android-studio.

If java is there Android studio will work just fine. Most probably you will have to go to 
<Android-studio extracted location>/bin/   and ./studio.sh there. Most of the time you will do this as root.

If you have successfully installed Android in your system what it does is in your profile it makes a hidden directory called .android and your avd instance settings will be saved in a directory called avd and there you can find your your_test_avd.ini file

If you are root when you are installing android what happens in these .android/avd directories are created under root users folder and when you try to execute avd manager and start a avd as a normal users there are no .ini files in  <your profiile>/.android/avd.

There are 2 things that you can do to get it over with.

1. Copy /root/.android/avd content to $HOME/.android/avd. Just a matter of simple command and worked for me. :D

2. Before android search .ini files in $HOME/.android/avd it looks for environmental variables called 
$ANDROID_AVD_HOME. SO you can set its value to root/.android/avd. :) (y)



Share:

New Android Studio


I think Google just made all the android tutorials related with eclipse that are available on the internet obsolete just like that with the launch of the android studio.

What is android studio ?

If you are familiar with android development with Eclipse IDE and ADT  (Android Development Tools) , new android studio is a replacement for the both IDE and ADT. The stable version of the studio was released in 8th December 2014 named version 1.0.1.

In the earliest versions we had download eclipse for Java and then install android development related components via android web site.

Then Google made it easier. After that there was a eclipse version bundled with android development tools (ADT). Of course after setting up needed SDKs and related components had to be downloaded. This was much easier than eralier version because there was a AVD manager and SDK manager already installed. We just had to download a SDK we like and create an AVD and start coding. For now I did my lot of coding with this version.

Now with android studio it is much much easier. No need to download SDK or create an AVD at all.Because the latest SDK that is Lollipop (API 21 ) is already with the android studio and a sample Nexsus AVD is already created. Now you just have to download and start coding. 


But not so fast. There comes the HAXM problem. See this post to check it out.

Whats new about it ?


This may be a personal experience. But when I opened Android Studio for the first time I was amazed and a bit frightened at the same time.

1. UI is much more nicer now. Thats good. But at the same time its not exactly like same old eclipse. You have to do some round of navigation to get it right.

2. AVD seems much light weight and performance wise that is ok too. (So far :p)

3. Good VCS support is there. Its says on the developer site. Haven't tested that yet.

4. New AVD manager is cool. It allows to create devices like TV,Tablets,mobile and even wearable device.

So those are the things so far. Havent done much of coding with studio as it has been like 2 weeks its released and  this is Christmas vacation. :p If you too know anything, lets share it via comments.

Happy coding. :D


Share: