I created a service application without any GUI...infact take help of other applications available on this website...but when i try to run it on my Emulator (2.3.3), I keep on getting error:
2012-02-13 17:36:56 - RUN_SERVICE] No Launcher activity found!
[2012-02-13 17:36:56 - RUN_SERVICE] The launch will only sync the application package on the device!
After it installs properly, but i dont see my service running...i tried adding toast messages, but I am not receving that as well...i didnt try it on real device yet...as I didnt have any phone with this android version 2.3.3. I am using jre6
As your applicatinon does not have any GUI.
You must start the Service from at least one activivity that may be lanucher acitivity by using
<category android:name="android.intent.category.LAUNCHER>
So that your Service need to start when the app is installed or Run.
Make sure you have defined the activity in your AndroidManifest.xml file....
I think you mentioned this in your manifest <category android:name="android.intent.category.LAUNCHER>. if yes then remove this
Related
I am developing an Android application with Xamarin.Android.
My application is running perfectly, but when I add GCM Component it gives the following error:
Android application is debugging.
The application could not be started. Ensure that the application has been installed to the target device and has a launchable activity (MainLauncher = true).
Additionally, check Build->Configuration Manager to ensure this project is set to Deploy for this configuration.
If I remove the component then it works fine.
Here is the image for the error:
I have tried many solutions from Google, but nothing has helped.
How can I prevent this error from happening?
You need to make sure that your package name does not start with an uppercase letter - from your screenshot, it looks like it does "RestaurantAPP".
This is a known issue with GCM itself and is not a bug in the Xamarin component: https://code.google.com/p/android/issues/detail?id=37658
I have two applications installed on the device: from one app I want to start a service as follows:
Intent i = new Intent();
i.setComponent(new ComponentName("com.app.service", "com.app.service.NotificationService"));
context.startService(i);
The second app is only installed but not started.
What I want is to start the notification service(which should create a notification) from the second service by using the above code.
In the manifest file of the second app I declare the service as follows:
<service
android:name=".service.NotificationService"
android:exported="true" />
The problem is that the Notification Service from the second app does not start.
Any ideas on why this happens?
Just to be clear, the second app is the Notifications one right?
If so, what I would try is loading both apps individually first, and then creating a method in your second one to access the information from the first one.
I had a similar scenario, let me just find the solution (somewhere on my laptop) and get back to you more specifically.
Not exactly a great solution but I have fixed my problem by removing the NotificationService file from the com.app.service directory, and adding it to the com.app directory.
This fixed the issue for me, meaning that I managed to start the service of the second application from the first application.
I can hide icons from a Menu, but then the app can not run.
Actually, it is a monitoring app. Can anybody help me?
What I want to do is hide the icon when app is installed on device I tried several ways but then app activity not show and I get error:
[2012-07-13 12:28:40 - Demo App] No Launcher activity found!
[2012-07-13 12:28:40 - Demo App] The launch will only sync the application package on the device!
why not just use a service? and/or a broadcast receiver?
anyway, so it wont install an icon, use this:
remove this from the intent filter in your manifest.
<category android:name="android.intent.category.LAUNCHER" />
you might wanna add a receiver so reboot wont be required.
I am running a sample push notification example.I have done the c2dm signup and got an email.But the problem is when i run the program logcat shows registration id as null and error as "Service not available".
Please help me.
Thanx in advance
This has happened in my application as well. I find that when the emulator starts you often need to let it run the intent (i.e. your main activity) and then exit the application. Start the application again from the emulator and it seems to work for me. A few things to double check while your at it:
1. Did you declare your receivers in your manifest file?
2. Did you use the proper package name in your manifest?
3. Did you run the google api (level 8) AVD
4. Did you add your push sender account to the emulator?
hope this helps!
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.
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
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.
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.....!!!!!!
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.
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.
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
Error: Activity class {com.myapplication5.myapplication/com.myapplication5.myapplication.MainActivity} does not exist.
answer:
file-projectstructur-flavors-minsdk version =4
ok