Tuesday, October 29, 2013

Possible problems,errors and warnings in Eclipse ! and their solutions..


All Possible problems, errors and warnings in Eclipse while developing Applications:

Probable Problem 1:
“Project missing” !
“R.java missing” !

Solution:
Goto  project -> clean






Probable Problem 2:
If emulator does not start !

Solution:
Solution 1: uncheck  “Launch from snapshot” and click Launch.
Solution 2: Check the Android SDK path we set before. If there is any blank spaces in the pathname just remove those spaces. Our path should not contain spaces !!





Probable Problem 3:
If any emulator communication problems or device problems occur !

Solution:
If so then the problem is in ADB, hence go to Window -> Open perspective -> Other -> DDMS -> Ok.
In the devices menu select “Reset ADB”
  





Probable Problem  4:
Cannot see the log messages of Android device !

Solution:
Go to Window -> Show view -> Other -> Android -> Logcat.






Probable Problem  5:
If “@override” shows error !

Solution:
it means that the compiler is not affording the program. So change the Compiler level to 1.6. For that go to  Properties -> Java compiler -> Compiler compliance level -> 1.6




Probable Problem 6:
“missing imports” !
“Cannot be resolved to a variable” !

Solution:
Right mouse click on the editor  Source -> Organize imports .
And import right packages



Setting up Eclipse for Android development

Installing Eclipse to make it ready for Android application development is little bit complex for newbies! Yeah Me too tried setting up Eclipse to the way it seem to work, But I couldn’t do it at the very first time. So I asked my Trainer and found the trick.You may think that building appliations is easy ..Yeah ofcourse it’s! But you must be clear in Eclipse setup and must know the problems you might get with Eclipse during work. Before getting into work there are some important steps to do as part of Installation. I will guide you step by step.


Step 1: download the latest java jdk and install it.

Step 2: Then download Eclipse IDE. (There are many versions of Eclipse available for download such as Eclipse JUNO, Elipse Helios etc.. ITS upto you downloading the Eclipse IDE).
But I prefer you to Just stick with me guys . The best way not to mess up with Eclipse is to download the ADT BUNDLE so that there is no need for importing each things (SDK,ADT)into Eclipse IDE . The ADT BUNDLE itself comes with everything within .

Step 3: As you download the “Eclipse ADT BUNDLE” the next steps you must do are

i)            Open Eclipse  ->  Help  -> check for updates. And update eclipse IDE first.

ii)           After update is over it will ask for restart and now click yes. Now Eclipse closes and starts again automatically.

iii)          Then we must setup the ADT path within Eclipse. For that go to  Help ->  Install new software ->  Add  -> in the Url type https://dl-ssl.google.com/android/eclipse -> click next  ->  Finish  -> again Eclipse will restart .
Above is the recommended method for setting up ADT path. The other method You can also setup ADT is by selecting the ADT file you downloaded in your Computer.

iv)         Then we must setup the SDK path within Eclipse. For that go to  Window ->  preferences ->  Android  -> In the “SDK location” select the sdk folder. The SDK folder is within the downloaded ADT BUNDLE itself. Select it and click ‘ok’.

v)           Then we must update SDK . For that click on SDK MANAGER icon



vi)         Now SDK MANAGER shows up. In that TICK on “ ANDROID 2.2(API 8) ” and click Install packages button to Install that version. We Install that version because if we develop older android version based applications ,it can be run in any older (like Gingerbread) as well as new Android OS versions(like jellybean , kitkat.. etc) . But if we develop applications for latest android versions like 4.3 then it might not work in some older mobile that runs on Android 2.1 and so .



Step 4: That’s it. Everything is done!!

Step 5: Now you can start developing applications.



Note : In my next posts I will teach you everything in Android step by step from the beginning till end about developing  Applications as well as Games.


Please Stick with me Guys. At the very beginning you may feel  You can’t learn Android ‘coz of its complexity. Just trust me Guys .It’s not so difficult as you think !! As we go through a few tutorials you automatically get every idea in it .. And you will say “ Wooooooo I’ve got everything” and when  we reach a level of completing the course and if at that moment you just look back you would say “Hooo I’m on a huge steps up to a level of developing own applications and selling them on the google play market !! “ Just Stay with me Guys ! We are gonna launch new applications !