Xamarin GCM Component - Manifest Malformed - android

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

Related

Cucumber-JVM Android - Testing Native applications using JUnit

I am having trouble testing native applications (such as Contacts and Settings) using Cucumber-JVM for Android with JUnit. Initially, I got the following message:
"Test run failed: Permission Denial: starting instrumentation ComponentInfo???{com.test.contacts/android.test.InstrumentationTestRunner???} from pid=673, uid=673 not allowed because package com.test.contacts does not have a signature matching the target com.android.contacts"
To solve this problem, I signed the test application with the same keys of the Contacts native android application (shared.x509.pem and shared.pk8) and I also added the following line to the AndroidManifest.xml file (as suggested in How can I sign my application with the system signature key?):
“android:sharedUserId="android.uid.shared"
This seemed to solve the problem.
However, after this change, I only manage to run the first test from a test suite. When the second test is running, it gets lost in the getActivity() method from the class ActivityInstrumentationTestCase2, which my steps definitions class extends. More precisely, it doesn't get out of the mSync.wait() call in the method startActivitySync(Intent intent) from Instrumentation.java. The call to getActivity() calls launchActivityWithIntent(), from InstrumentationTestCase.java, which calls startActivitySync(Intent intent).
I found a similar issue on Why does getActivity() block during JUnit test when custom ImageView calls startAnimation(Animation)?, but the workaround described there doesn’t solve my problem.
My test application is really simple and it only checks the content of the buttons in the activity. I don’t have this problem if I use the same test application to test my own apps, only with native android applications such as Contacts and Settings.
Does anyone know something about this issue and could give me a light on how could I solve it?
Thanks in advance

A single BroadcastReceiver in an Android APK file.

Suppose we have an Android APK file which contains only a single BroadcastReceiver.
Will this form of the APK file be installed on Android devices be installed successfully and can the BR receive intended intents? I thought it will, but my experiment showed it does not. I am not sure why, but the installation of such APK files (with a single BR) seems to fail all the time.
A solution to this problem is to add a dummy Activity to the package. Then the installation succeeds, and the BroadcastReceiver can receive all intended intents!
Please share your opinion on this matter.
I always thanks you all for helps!
Will this form of the APK file be installed on Android devices be installed successfully and can the BR receive intended intents?
No.
I am not sure why, but the installation of such APK files (with a single BR) seems to fail all the time.
No, but the BroadcastReceiver will not receive broadcasts until something has directly invoked one of your components via an explicit Intent (i.e., an Intent that identifies the class). Normally, that will happen by the user launching your LAUNCHER activity. This has been the case since Android 3.1, about three years ago (see "Launch controls on stopped applications" in the Android 3.1 release notes).
You need at least one Activity for landing page in the android app. What are you expecting will happen when the app is launched manually?

AVD blackscreen after enableLocalDatastore

Has anyone experienced something like this ? My app works but after I add the line "Parse.enableLocalDatastore(this);" in my Application class it stops. Eclipse tries to launch it but right after the white screen, it turns black and LogCat notifies this warning "05-24 14:15:20.683: W/ActivityManager(382): Launch timeout has expired, giving up wake lock!"
First time I experience such thing, tried searching on Parse.com and nothing.
Additional info:
Android + Google APIs v4.4.2
Parse v1.5.0
Well, it wasn't the SDK's fault.
Solution: Had to create a new AVD to test my app after adding the line "enableLocalDatastore".
^true, same here, I lost ~10h to find out why!!!! seems it is parse.com lib BUG!!!!! when build the android application on release mode!!!!!!!
solution add this :
Parse.enableLocalDatastore(this);
before
Parse.initialize

Android Service application error - no launcher activity

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

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.
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

Categories

Resources