0

I downloaded new Android SDK r20 and installed.

I created new application with an activity and a service. I am starting service in onCreate() method of activity.

I am getting Runtime exception Class Not Found which is my Service class name. I tested same application with SDK r14, no such exceptions and it is working fine.

Then, what is wrong with SDK r20 ??? Somebody please answer me. I searched about this problem on google, but no use.

Yugandhar Babu
  • 10,311
  • 9
  • 42
  • 67
  • Down vote is not answer to my question. It seem to be silly to whom don't know the answer. – Yugandhar Babu Sep 27 '12 at 10:37
  • @vignesh4303 I am not using any jar files in my project. The link you given is not useful for me. The problem may be same, but no proper solution to my problem there. – Yugandhar Babu Sep 27 '12 at 10:41
  • Unfair downvote, I thought. If you had noticed this when R17 came in you might have spotted it, however going from 14 to 20 in one leap it's understandable why you missed the fix. The link above wil give you the answer ( seems not) – NickT Sep 27 '12 at 10:42
  • @NickT Unfortunately I updated SDK and faced this problem. – Yugandhar Babu Sep 27 '12 at 10:46
  • http://stackoverflow.com/a/10848701/1012284 http://android-developers.blogspot.in/2011/10/changes-to-library-projects-in-android.html – Padma Kumar Sep 27 '12 at 11:04
  • I'm sorry, I don't know the answer. Posting your manifest might give a clue but, unfair downvote so I've upvoted to restore the natural balance of the Androidverse or bad stuff will happen. – Simon Sep 27 '12 at 11:13

1 Answers1

1

You should try this:

1.Remove all references to the JAR in your project from Java project -> properties -> Java build path -> libraries

2.Create a libs folder if not exist at the root of your project Copy the JAR into the libs folder.

3.If still not running OK. Right click your project > Android Tools > Fix Project Properties

clean your project and run. it will work

RajaReddy PolamReddy
  • 22,428
  • 19
  • 115
  • 166
  • I never mentioned about jar files in my problem. Why you guys are talking about jar file ? – Yugandhar Babu Sep 27 '12 at 10:43
  • the supporting jar files? they will be added automatically while creating project, I didn't added any jar files manually in my project. – Yugandhar Babu Sep 27 '12 at 10:45
  • in the `SDK r20` having bugs. if you did't have any libs folder in the project add one libs folder and then add those supporting file in to that.and then follow my steps. i was also faced same problem. in first.in r17 http://stackoverflow.com/a/9886758/964741. – RajaReddy PolamReddy Sep 27 '12 at 10:48