2

I am learning this via Sams Teach Yourself Android in 24 hours.

This is really strange, I run the app in the emulator and I get my splash screen (just some crappy text really) then I press the home button, and click on my app's icon and it gives me "Application is not installed on your phone"

I went into the emulators settings->applications and it's there!

I cleaned the project, uninstalled it from the emulator and re-ran it. Same damn problem.

(project is simple: 6activities, each has a unique text, as it starts it shows the splash activity I have not even connected the other activities... just this)

You can download the entire source if you want at http://elxotica.com/TriviaQuiz.rar

Michael Petrotta
  • 59,888
  • 27
  • 145
  • 179
Ryan
  • 9,821
  • 22
  • 66
  • 101
  • 1
    Show us your manifest. That it is what configures which launchers are available. Also, does logcat tell you anything? Run `adb logcat` or open the DDMS perspective in eclipse. – Cheryl Simon Mar 02 '11 at 00:51
  • Manifest: I don't know how to post code in a comment so have uploaded it here: http://elxotica.com/m.xml will write what logcat tells me in the next comment – Ryan Mar 02 '11 at 01:59
  • Logcat: http://elxotica.com/logcat.JPG – Ryan Mar 02 '11 at 02:03

7 Answers7

12

Ok, got it working after going to the authors website, downloading the support code and going over it and comparing it line by line.

Basically in my manifest file I had

<activity android:name=".QuizSplashActivity"
                  android:label="@string/app_name">

and again below I had

<activity android:name="QuizSplashActivity"></activity>

which I thought was needed, but it looks like that should not be declared twice.

I fixed the problem but am not 100% sure of the cause :((

AlfonsoML
  • 12,634
  • 2
  • 46
  • 53
Ryan
  • 9,821
  • 22
  • 66
  • 101
  • Had same error message and also realized I had an activity listed twice in my manifest. Really terrible error message thats for sure. – JoeyJ Nov 30 '11 at 11:41
3

My problem was solved with this error when I moved the INTERNET permission statement in the manifest file out of the activity definition and into the application definition - that is, up in the hierarchy, right under the SDK version declaration:

<uses-sdk android:minSdkVersion="14" />
<uses-permission android:name="android.permission.INTERNET"/>
<application android:icon="@drawable/icon" blah blah

I also had the permission defined twice. Compiling did not find the bug, however, running the app on the Android emulator did. "Application not installed" is not very helpful, tho. Rather like, "You fowled up [and if you don't know why, I'm not telling you].

0

Same symptom, different cause. I'm not entirely certain what happened, but I will hazard a guess in case it helps anyone. What I know for sure: I deleted the icon, dragged it anew from Applications, problem solved.

At some point I changed which Activity was the entry-point (had android.intent.category.LAUNCHER & android.intent.action.MAIN)

I was trying to open the app using an icon on one of my "desktops", an icon which I had added before making the change in the manifest which changed which Activity was MAIN. So I'm guessing that the shortcut refers to the launcher activity and not the app (makes sense)...

Blake Miller
  • 805
  • 11
  • 16
0

My problem was missing assemblies in the package. But only on some phones. I enabled "link all assemblies" option in the Xamarin studio and problem solved. Android project options->Android build->Linker behavior->Link all assemblies.

[I'm using Xamarin studio with mono on Android.]

Ludwo
  • 6,043
  • 4
  • 32
  • 48
0

I have no problem to run it on Android 2.2 Virtual Device. Maybe you can try create new AVD and run it there. I´ve had similar problem with new update and creating new AVD solved it...

Komi
  • 330
  • 3
  • 13
  • Ok, gotta re-read how to create a new AVD but will do so and report back :) Thanks! – Ryan Mar 02 '11 at 02:03
  • Nope, didnt work, got the same crap ;( It ran fine the first time then clicking the icon gives me that same error :( – Ryan Mar 02 '11 at 02:31
0

Yeah, I had the same problem. Just don't declare QuizSplashActivity twice. Helped in my project, grettz

cdcsd
  • 1
0

Yet another failure mode with the same symptom. I had same permission twice, first like this:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>

then like this:

 <application android:icon="@drawable/icon" android:label="@string/app_name" android:permission="android.permission.WRITE_EXTERNAL_STORAGE">

The second one turns out not only not needed, but also cause the "Application not installed.." error.

So my application declaration looks like this now:

<application android:icon="@drawable/icon" android:label="@string/app_name">

And all is well in the world.