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
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 :((
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].
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...
Yeah, I had the same problem.
Just don't declare QuizSplashActivity twice.
Helped in my project, grettz
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.
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)...
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.]
Related
I don't know when this occurred, but my app was always listed by MyAppName under the Android Phone Settings for Location Permissions - the settings section that specifies what apps are allowed to use location services (ie: always, only when in use, never, etc).
I discovered yesterday that in this section my app is no longer listed as MyAppName and is now listed as webIntentFilter - I was able to validate this on several Android phones, including my own. My app icon is correct, just the name is wrong.
In my config.xml:
<widget id="com.myAppName" ... >
<name>myAppName</name>
So, obviously some android:label: 'webIntentFilter' is overriding my config.xml app name.
I haven't a clue as to where this is originating from. I searched my entire project folder for files with the string webIntentFilter in them and got 17 hits across 12 files. But I don't know which one is causing the problem. I looked at all of them and none of them seem to be related to Location Services so I can't determine which is the culprit.
How can I fix this?
I found it....but I still have no idea how it happened, or how many revs of my app its been like this.
In projectFolder\platforms\android\app\src\main\AndroidManifest.xml was the main <application> section xml tag had the following:
<application
android:allowBackup="false"
android:fullBackupContent="false"
android:fullBackupOnly="false"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="webIntentFilter" <----------------------------- here
android: name="androidx.multidex.MultiDexApplication"
.....
>
Changing it to: android:label="myAppName" fixed it.
So in an effort to refactor my code I introduced a custom application class to my app by extending Application class and including 'android:name=".MyApp"' in the manifest:
<application
android:name=".MyApp"
android:hardwareAccelerated="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/AppBaseTheme" >
The problem I face is that this broke the launcher shortcut for a number of my users after they downloaded the update. Its an issue as some uninstall the app in confusion, this impacts my metrics.
Rolling back now isnt an option as it will break the shortcut again.
The reason why I believe its the addition of the name attribute in the application tag is because I am actually able to reproduce this consistently on a number of test devices. On some this creates a duplicate shortcut on the home screen and in the app drawer. And on others breaks the home screen shortcut and users see "App isnt installed" message.
Any advice or recommendations on how to deal with this? Thanks.
here is the problem. I'm new with android so i was just designing a simple form with some textfields and button, nothing complicated, and it runs perfectly!
Nevertheless when i add another class in order to work with SQLite database, it doesn't run, and shows the following message: "UNFORTUNATELY, HAS STOPPED"
Please if u have any idea 'bout to fix this problema i'll be more than thankful.
PS: i'm using the ADT BUNDLE FOR WINDOWS which has Eclipse, sdk, sdk manager. just for the record.
...And just in case u ask me for the log error here it is:
Guys thanks a lot for your help! i know it's kinda boring but thanks anyway.
Here is the manifest should i add the new activity in this part of the code or where?
have you created a new activity?
every activity created must be added to the manifest file of the app otherwise the app will crash when that activity is started.
heres how you add it to the manifest:
<activity android:name="com.android.test.ActivityName"
android:label="#string/activity_label" ></activity>
where com.android.test.ActivityName is the name of the activity as it appears in the package
add that between the <application> </application> tags
Solved
Thanks to #Ifor's suggestion I think I have discovered what was causing it. Since I was not making any changes to the code, only to the resources eclipse must have not bothered creating a new .apk.
Deliberately breaking the code meant that I was changing the code therefore prompting eclipse to re-create the apk. I could be wrong in my hypothesis being a bit of a newbie but it's fixed now anyway so thanks everybody!
I have two home-made applications both with icon A. Recently I got sick of being confused by them so I tried to change one of them for a new icon, icon B.
This is not working!
I have tried:
Re-installing the app;
Un-installing the app then re-installing it.
Un-installing the app then rebooting the phone and the computer then re-installing the app.
None of this works, I still end up with the original Icon A.
I have replaced the icons in the hdpi, ldpi and mdpi folders. I've also searched the folder containing my application for .png files, the only ones there are the three versions of Icon B (the correct one)
What's happening, is there a cache problem like with the windows phone development? I came across this while searching for an answer.
Btw I'm using Eclipse on Windows Vista Ultimate
Any Ideas Anyone?
As Requested here's the Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.PianoSets" android:versionCode="1" android:versionName="1.0">
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".PianoSets" android:label="#string/app_name"
android:screenOrientation="landscape"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SavedAccounts"></activity>
</application>
</manifest>
A 'cleaner' method (pardon the pun!) that worked for me (forcing an update of replaced ic_launcher icon):
Project -> Clean
I got the idea from this tutorial:
http://www.slideshare.net/YasmineSherif91/android-application-how-to-change-the-icon-tutorial-2
EDIT: Although clean updates the icons, I get build errors unless I do a Refresh on the added resources before doing the clean. More info about the complementary function of refresh and clean:
Does refreshing in Eclipse also Clean the project?
Some cautions and limitations of clean here:
Function of Project > Clean in Eclipse
Thanks to #Ifor's suggestion I think I have discovered what was causing it. Since I was not making any changes to the code, only to the resources eclipse must have not bothered creating a new .apk.
Deliberately breaking the code meant that I was changing the code therefore prompting eclipse to re-create the apk. I could be wrong in my hypothesis being a bit of a newbie but it's fixed now anyway so thanks everybody!
I find deleting the gen directory fixes this sort of problem easily. It gets rebuilt immediately, and the rebuild refreshes everything.
Make sure the file you use to replace the old ones are also in lower caps. Ie, replacing home.png with Home.png will not work in Eclipse.
You probably updated icon in only one folder. Make sure you've updated the icon in all "drawable" folders:
res/drawable-ldpi/icon.png
res/drawable-mdpi/icon.png
res/drawable-hdpi/icon.png
I am new to Android and I am trying a few small apps (like Compass). When I run the app in the emulator, it gives the message Unfortunately, Compass has Stopped.
I have no compile time errors.
How do I solve this, and what is causing this?
Thanks in advance.
I had the same error message and found that, in commenting out uses-permission nodes in AndroidManifest.xml I had commented out one that was needed. When I put it back in the app ran fine. I was able to reproduce the error. I needed:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
This was for a barebones index.html, single page app, that displays Hello World.
And the permission above was the only one I needed to do Run As/ Android Application and get it to run in an emulator.
HTH
You have posted no code so it's difficult to see what your problem is. However I had the same issue which has been sorted out here Unfortunately HelloListView has stopped
It probably due to the fact that you don't have accelerometer and magnetic field support.
Go to your AVD configuration and add the following hardware: Magnetic Field Support and accelerometer
First check your AndroidManifest.xml file and write activity tag
For example, you have DisplayMessageActivity.class and package is me.user_interface
tag is:
<activity android:name="me.user_interface.DisplayMessageActivity"/>
You can write this after </activity> tag in AndroidManifest.xml file. Check the path carefully.