Rebooting
Rebooting

Reputation: 2938

android activity class does not exists?

I have been developing a project in eclipse for an android app. An error which i frequently get is that of- activity class does not exist. But when i just save the manifest file once again the error vanishes and the program runs correctly. Why then do i get the same error again and again. ?

Console error:

[2011-11-18 15:08:38 - link] Starting activity acb.abc.LinkActivity on device emulator-5554
[2011-11-18 15:08:40 - link] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=acb.abc/.LinkActivity }
[2011-11-18 15:08:40 - link] New package not yet registered with the system. Waiting 3 seconds before next attempt.
[2011-11-18 15:08:40 - link] ActivityManager: Error: Activity class {acb.abc/acb.abc.LinkActivity} does not exist.

Upvotes: 0

Views: 18657

Answers (7)

Maksim Ryabovol
Maksim Ryabovol

Reputation: 361

In may case, in Android Studio, I changed AndroidManifest.xml like this: change main Activity on my custom Activity. Then I start my app on emulation device, I get:

"Error type 3 Error: Activity class {...} does not exist.",

and may app failed.

I was forced delete my app on virtual device (use Application Manager in device) and restarted app in Android Studio. This solution helped me.

Upvotes: 1

Kavos Khajavi
Kavos Khajavi

Reputation: 173

Error: Activity class {com.myapplication5.myapplication/com.myapplication5.myapplication.MainActivity} does not exist.

answer: file-projectstructur-flavors-minsdk version =4 ok

Upvotes: -2

John Doe
John Doe

Reputation: 2806

i had this problem too and it was because i had a second tag in my AndroidManifest.xml on android studio <= 0.8.6 it was no problem

i'm not sure yet how to handle this if one needs two application's defined here

my use case was related to saving the application state in a separate activity e.g. http://blog.tomgibara.com/post/126377651/global-application-state-in-android

Upvotes: 0

Jack Chen
Jack Chen

Reputation: 31

I got this problem today.

Attention that: "class {acb.abc/acb.abc.LinkActivity}",you should modify the AndroidManifest.xml, change acb.abc.LinkActivity to ".LinkActivity". Then will be OK.

Upvotes: 2

yladsr
yladsr

Reputation: 43

I saw this error because I had installed my app as a built-in app, then disabled it to removed it. I thought I had removed it when I tried to run my app in eclipse as a "normal" app. I discovered that my app was still in system/app.

Once I removed it, I didn't see this error when running my app in Eclipse.

Upvotes: 0

Rohit
Rohit

Reputation: 603

You are not declairing your package name correctly in your manifest, thats what I guess. Either post your manifest or go through this discussion.

http://groups.google.com/group/android-developers/browse_thread/thread/ce62996fde2d4727

Cheers.....!!!!!!

Upvotes: 1

Shaireen
Shaireen

Reputation: 3703

every time a new activity is added in the application, it needs to be added in the manifest file as well with a new tag. Make sure that u r doing this otherwise the new activity will not be considered. For reference see This

Upvotes: 4

Related Questions