When I run my application in the emulator, it runs fine. When I send it (email) to my phone, the following message occurs:
Sorry! The application Package Installer (process.com.android.packageinstaller) has stopped unexpectedly. Please try again.
I have tried the solutions to similar questions on SO and have looked through Google to find a solution that will work, so far to no avail.
Here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="application.android"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET"/>
<application android:icon="#drawable/icon"
android:label="#string/app_name"
android:permission="android.permission.INTERNET">
<activity android:name=".MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".HistoryActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".DiagnosisActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".eula"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".disclaimer"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".DetailsActivity"
android:label ="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".ResultsActivity"
android:label ="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".DiagnosisNoteActivity"
android:label ="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".NewDiagnosisActivity"
android:label ="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".DiagnosisTabActivityGroup"
android:label ="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".TabGroupActivity"
android:label ="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".SplashActivity"
android:label ="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
<activity android:name=".NewScreenActivity"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.NoTitleBar"></activity>
</application>
When debugging on my phone through Eclipse the following shows in console:
[2012-03-12 23:38:52 - ruleout] Android Launch!
[2012-03-12 23:38:52 - ruleout] adb is running normally.
[2012-03-12 23:38:52 - ruleout] Performing ruleout.android.MainActivity activity launch
[2012-03-12 23:38:54 - ruleout] Uploading ruleout.apk onto device 'A0000028F2ABCF'
[2012-03-12 23:39:11 - ruleout] Installing ruleout.apk...
[2012-03-12 23:40:16 - ruleout] Success!
[2012-03-12 23:40:16 - ruleout] Starting activity ruleout.android.MainActivity on device A0000028F2ABCF
[2012-03-12 23:40:17 - ruleout] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=ruleout.android/.MainActivity }
[2012-03-12 23:40:17 - ruleout] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=ruleout.android/.MainActivity } from null (pid=16174, uid=2000) requires android.permission.INTERNET
There is nothing shown in the LogCat window and as far as I can tell, I have enabled internet permissions. Also, I did add the android:debuggable="true" attribute to the application tag.
I managed to solve the problem so for anyone who comes across the same issue, if you remove the android:permission attribute from the application tag in the manifest, then it works like a charm.
Are you debugging? If so, you will need to add "android:debuggable" your application tag like so:
<application
android:icon="#drawable/icon"
android:label="#string/app_name"
android:debuggable="true"
You should also check that the phone is in debug mode (Settings>Application>Debugging)
Related
I'm working on an Android app and have just added the Splash Screen as I will be loading from SQLite on start-up...
After telling the AndroidManifest that I'd like to have my Splash activity as my LAUNCHER, it seems that it's changed the name that my app is downloaded under.
The app is now called Splash, has anyone had this problem before?
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.codedaykcrunningapp.MainActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.codedaykcrunningapp.Workout"
android:label="#string/title_activity_workout" >
</activity>
<receiver
android:name="com.example.codedaykcrunningapp.Widget"
android:label="#string/app_name" >
</receiver>
<activity
android:name="com.example.codedaykcrunningapp.Splash"
android:label="#string/title_activity_splash"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Android is using the label name of your launcher activity so change that to your app name
change
<activity
android:name="com.example.codedaykcrunningapp.Splash"
android:label="#string/title_activity_splash"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
....
to
<activity
android:name="com.example.codedaykcrunningapp.Splash"
android:label="#string/app_name"
android:theme="#android:style/Theme.Black.NoTitleBar" >
<intent-filter>
....
this will fix your problem
After telling the AndroidManifest that I'd like to have my Splash
activity as my LAUNCHER, it seems that it's changed the name that my
app is downloaded under.
BCOZ
If you have a "launcher activity" with [label name] & "application tag" also with a different [label name] then Android will take the [label name] from the Launcher Activity.
For more information you can see this android documentation.
The app name is set in the file Android Manifest, please check the item application and attribute android:label.
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
...
</application>
I get this error while I was uploading .apk to Google Play:
Upload failed
Your APK cannot be analysed using 'aapt dump badging'. Error output: <pre>Failed to run aapt dump badging: W/ResourceType(19605): Failure getting entry for 0x7f070000 (t=6 e=0) in package 0 (error -75) ERROR getting 'android:icon' attribute: attribute is not a string value</pre>
I have icon image under drawable folder with 96x96 size.
I had values-sr folder for some translation, but I deleted that folder because I don't need that translation now.
Here is my AndroidManifest.xml file:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
<application
android:allowBackup="true"
android:icon="#drawable/icon"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar.Fullscreen" >
<activity
android:name="com.zookey.mathgenius.HomeActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden|keyboard"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.zookey.mathgenius.activities.LocalGameActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.ResultActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.TimedResultActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.RaceResultActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.RaceRankActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.OnlineRaceRankActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.OnlineRaceResultActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.SettingsActivity" android:noHistory="true" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.zookey.mathgenius.activities.HelpActivity" android:screenOrientation="portrait" android:configChanges="orientation|keyboardHidden|keyboard"></activity>
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
I ran into a similar problem when uploaded an app. Turns out that the app icon in my manifest:
android:icon="#drawable/app_icon" had corresponding files under /res/drawable-small, /res/drawable-normal, /res/drawable-large and /res/drawable-xlarge but not under /res/drawable. Looks like the automated process of Google Play only looks up /res/drawable. Copying the app icon into this directory did the trick for me.
[2013-05-07 13:06:56 - final_app] Performing sync
[2013-05-07 13:06:56 - final_app] Automatic Target Mode: Several compatible targets. Please select a target device.
[2013-05-07 13:07:02 - final_app] Uploading final_app.apk onto device '015d256464281611'
[2013-05-07 13:07:14 - final_app] Installing final_app.apk...
[2013-05-07 13:07:18 - final_app] Success!
[2013-05-07 13:07:18 - final_app] \final_app\bin\final_app.apk installed on device
[2013-05-07 13:07:18 - final_app] Done!
Hi I have been pulling my hair out for the past 24 hours I am a newbie and added Google Maps after this I'm not sure what the issue has been I can no longer launch the app on my Nexus 7 or the AVD it does not show up, I have got my API key etc. but now the app installs \final_app\bin\final_app.apk and I can not launch it any more I selected Googles APi everything should function properly, how do I launch the app again there is no icon what so ever. Could it be my manifest?
ANDROIDMANIFEST
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.final_app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<uses-library android:name="com.google.android.maps"/>
<activity
android:name="com.example.final_app.splash_screen"
android:label="#string/app_name" ></activity>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<activity android:name="MainActivity"></activity>
<activity android:name=".activity_2"></activity>
<activity android:name=".activity_3"></activity>
<activity android:name=".activity_4"></activity>
<activity android:name=".activity_5"></activity>
<activity android:name=".MySQLiteHelper"></activity>
</application>
</manifest>
In short, I want to: Launch my app as it no longer shows up or starts on both my android device or AVD.
I think I got your error, it was in the menifest file
<activity android:name="MainActivity"></activity>
it should be
<activity android:name=".MainActivity"></activity>
or follow this menifest file
<application
android:icon="#drawable/test"
android:label="#string/app_name" >
<activity
android:name=".ABC"
android:label="#string/app_name" android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".welcome" android:theme="#style/Custom" android:label="#string/app_name" android:screenOrientation="portrait">
</activity>
it should work i guess,..
I have problems running the latest Android emulators like "Nexus 7, Android 4.1.2". The emulator can start, but I can't deploy on it (by Maven) which probably depends on this problem: When I switch on the phone to the Apps view, I get "Unfortunately, launcher has stopped" and LogCat gives me the following output:
01-02 14:30:26.313: W/ActivityManager(151): Permission denied:
checkComponentPermission() owningUid=1000 01-02 14:30:26.313:
W/BroadcastQueue(151): Permission Denial: broadcasting Intent {
act=android.appwidget.action.APPWIDGET_UPDATE_OPTIONS flg=0x10
cmp=com.android.settings/.widget.SettingsAppWidgetProvider (has
extras) } from android (pid=970, uid=10014) is not exported from uid
1000 due to receiver
com.android.settings/com.android.settings.widget.SettingsAppWidgetProvider
My AndroidManifest looks like this:
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk
android:minSdkVersion="5"
android:targetSdkVersion="7" />
<application
android:name="my.domain.appcontext.ApplicationContext"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:allowBackup="true">
<activity
android:name="my.domain.appcontext.activities.MainActivity"
android:screenOrientation="nosensor"
android:theme="#android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="my.domain.appcontext.activities.MainMenuDialogActivity"
android:excludeFromRecents="true"
android:theme="#style/Theme.Dialog" >
</activity>
<activity
android:name="my.domain.appcontext.activities.DistrictMenuDialogActivity"
android:excludeFromRecents="true"
android:theme="#style/Theme.Dialog" >
</activity>
<activity
android:name="my.domain.appcontext.activities.StreetMenuPreselectionDialogActivity"
android:excludeFromRecents="true"
android:theme="#style/Theme.Dialog" >
</activity>
<activity
android:name="my.domain.appcontext.activities.StreetMenuDialogActivity"
android:excludeFromRecents="true"
android:theme="#style/Theme.Dialog" >
</activity>
<uses-library android:name="com.google.android.maps"
android:required="true" />
</application>
Any ideas?
Are you trying to send the android.appwidget.action.APPWIDGET_UPDATE broadcast somewhere in your code? This is an Android OS broadcast, so you won't have permission to use it if you are...
I've built an app that runs fine on the emulators, and says that it installs ok on the phone. However, on trying to run it an error pops up saying 'Application is not installed on your phone'. So I tried running the app through eclipse on the phone and I got this error in the console:
[2012-05-01 12:00:02 - MAD Assignment] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.mad.assignment/.MainMenu }
[2012-05-01 12:00:02 - MAD Assignment] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.mad.assignment/.MainMenu } from null (pid=8204, uid=2000) requires null
From looking for the solution elsewhere it sounds as though it could be a problem in the manifest file, so here is mine:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mad.assignment"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
>
<activity
android:name="MainMenu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Diary"></activity>
<activity android:name=".Info"></activity>
<activity android:name=".MapMenu"></activity>
<activity android:name=".RSSMenu"></activity>
<activity android:name=".RSSFeedView"></activity>
<activity android:name=".MainMenu"></activity>
<activity android:name=".RSSDetailed"></activity>
<activity android:name=".DiarySchedule"></activity>
<activity android:name=".DiaryAddEntry"></activity>
<activity android:name=".DiaryEditEntry"></activity>
<activity android:name=".DiaryDetailed"></activity>
<activity android:name=".RSSDetailed"></activity>
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".MapMain"></activity>
<activity android:name=".RSSFeedView"></activity>
<activity android:name=".MapWhatsNearPreferences"></activity>
<activity android:name=".RoutePath"></activity>
</application>
Any ideas what this security exception is pointing to? Thanks!
The java.lang.SecurityException you are seeing is because you may enter two entries pointing to same activity. Remove the second one and you should be good to go.
You may be declared the activity 2 times in the manifest with different properties, like :
<activity android:name=".MainMenu"> </activity>
and
<activity android:name=".MainMenu" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
You should remove the unwanted one from the manifest
Set android:debuggable="true" under application.
You have an activity named
<activity android:name=".MainMenu"></activity>
Which is the Intent'ed activity from the launcher. But the activity to which you gave permission is "Mainmenu". Remove it. Add the permission and etc to the ".Mainmenu" which is blank now.
ie,
The 'activity' group should be
<activity
android:name=".MainMenu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Diary"></activity>
<activity android:name=".Info"></activity>
<activity android:name=".MapMenu"></activity>
<activity android:name=".RSSMenu"></activity>
<activity android:name=".DiarySchedule"></activity>
<activity android:name=".DiaryAddEntry"></activity>
<activity android:name=".DiaryEditEntry"></activity>
<activity android:name=".DiaryDetailed"></activity>
<activity android:name=".RSSDetailed"></activity>
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".MapMain"></activity>
<activity android:name=".RSSFeedView"></activity>
<activity android:name=".MapWhatsNearPreferences"></activity>
<activity android:name=".RoutePath"></activity>
And remove the duplicates as well. Why did you add so many duplicate 'activities' ?