0

On installation eclipse was working fine, but after updating support library and some other packages I get an error in appcompat folder in many theme files in the values folders in appcompat. Also no activity is created by default after this. Usually one hello world project used to open with an ActionBarActivity named MainActivity and layout file named activity_main. I had checked create activity in the new android application wizard and took blank activity.

What should be done to create an error free hello world project by default?

Nithin Baby
  • 7,486
  • 4
  • 21
  • 25

1 Answers1

0

You need to add support libraries in libs directory so that these errors are resolved. Check the official docs: https://developer.android.com/tools/support-library/setup.html#add-library

gaurav jain
  • 3,119
  • 3
  • 31
  • 48
  • Why doesn't the support library get added automatically? On adding support library the error disappears. Still on compiling I get ClassNotDef Error. – Nithin Baby Dec 14 '14 at 08:16
  • I figured out, this error occurs as when you create a project, you set minimum level sdk to 8. Hence, Android adds ActionBarActivity to support previous versions of Android, and it then requires you to add support library to support that. If you are building primarily for Android 4 or above, you could just add the minimum SDK to be same as target, and then these errors won't creep you. Hope this helps. – gaurav jain Dec 14 '14 at 08:53
  • It was a helpful information. Do you mean to say that even if I set the minimum SDK level as 21 it will work for all versions from IceCream Sandwitch? I am new to android. Please confirm the information. – Nithin Baby Dec 15 '14 at 14:23
  • I would recommend you to check this link : http://stackoverflow.com/questions/4568267/android-min-sdk-version-vs-target-sdk-version, some of the answers here are just awesome and I hope it'll clear all your doubts. – gaurav jain Dec 15 '14 at 15:31