I switched in manifest manually between activities because I made new activity that needed to be first. Everything works fine, but in the apps screen in my launcher where I see all apps below my app icon i see the name of the first activity "SplashScreen", but when I uninstall in or go to my apps I see that the name is OK.
My manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.CALL_PHONE"/>
<application
android:hardwareAccelerated="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:theme="#android:style/Theme.NoTitleBar" >
<activity
android:name="com.myapp.SplashScreen"
android:label="#string/title_activity_splash_screen"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.myapp.MainScreen"
android:label="#string/title_activity_main_screen"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.myapp.Cameras"
android:label="#string/title_activity_cameras"
android:screenOrientation="portrait" >
</activity>
</application>
android:label="#string/title_activity_splash_screen"
that is the name being used.
you can just delete this line (and all the label from the other activities) and let all activities use the application name #string/app_name
<activity
android:name="com.myapp.SplashScreen"
android:label="#string/app_name"
android:screenOrientation="portrait" >
This should display the Application name
Related
Heloo! I am creating an application in Android. I have declared all my activities in Android manifest, including the main one, and when i start it, it says that the activity i have selected as launcher does not exist:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.boacterapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="MainPage"
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="AboutPage"
android:label="title_firskljt_activity">
</activity>
<activity
android:name="RecentSightingsPage"
android:label="title_first_activity">
</activity>
</application>
</manifest>
I have been stuck here for a while, so i'm kindly asking that you could help me identity if i have a problem in my manifest. Thank you in advance!
Make sure MainPage activity is in package "com.example.boacterapp".
Another option: replace short name:
android:theme="#style/AppTheme" >
<activity
android:name="MainPage" <----------------- short
android:label="#string/app_name" >
<intent-filter>
With long name that makes up the full class name of your activity:
android:theme="#style/AppTheme" >
<activity
android:name="com.bla.bla.MainPage" <------------- long
android:label="#string/app_name" >
<intent-filter>
Add "." (dot) before MainPage
as
android:name=".MainPage"
Same for others,so rewrite your manifest as
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.boacterapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainPage"
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=".AboutPage"
android:label="title_firskljt_activity">
</activity>
<activity
android:name=".RecentSightingsPage"
android:label="title_first_activity">
</activity>
</application>
</manifest>
<activity android:name="MainPage"
should be:
<activity android:name=".MainPage"
assuming that your MainPage activity is in the package com.example.boacterapp. If not, you need to provide the fully-qualified name of the MainPage app.
Activity name should have dot prefix, change activity name to .MainPage. Make sure it is inside com.example.boacterapp package
I made my android application and tested it on the AVD but when I want to install it on my phone, I get "application not installed"
what could cause this problem??
here is the Manifest.xml, I don't see any thing weird in it !!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dashboard_our"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<permission
android:name="com.example.dashboard_our.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.Light.NoTitleBar" >
<activity
android:name="com.example.dashboard_our.MainActivity"
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="com.example.dashboard_our.Hotels"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Restaurants"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.About"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.PrayTime"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Airports"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Currency_convert"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Translator"
android:label="#string/title_activity_translate" >
</activity>
<activity
android:name="com.example.dashboard_our.WeatherActivity"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.PlaceDetailsActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name=".PlaceDetails" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.dashboard_our.Todo"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.Ocr"
android:label="#string/app_name" >
</activity>
<activity
android:name="com.example.dashboard_our.TodoDetailActivity"
android:label="#string/app_name" >
</activity>
<provider
android:name=".contentprovider.MyTodoContentProvider"
android:authorities="de.vogella.android.todos.contentprovider" >
</provider>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="API-KEY" />
</application>
</manifest>
any error from a DDMS? also you can try looking for .apk file from your project source and installing the app into the device.
Did you check "allow installation from non market applications" in your phone settings?
Did you remove an SD card around the time of installation?
Check if you have declared Main Activity twice inside AndroidManifest.xml. Delete one.
Another solution is if you haven't signed your app, you need to sign it. As the docs say All applications must be signed. The system will not install an application on an emulator or a device if it is not signed. Go here for more information: Android App Signing
I solved it, the problem was in my phone, I had to format my phone in order to work
I understand that android:label= decides the name of the app.
I have done it properly as follows:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.drsystem"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="16" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" >
</uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" >
</uses-permission>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.drsystem.LoginActivity"
android:label="#string/title_activity_login" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.drsystem.CalibrationActivity"
android:label="#string/title_activity_calibration" >
</activity>
<activity
android:name="com.example.drsystem.DeadReckoningActivity"
android:label="#string/title_activity_dead_reckoning" >
</activity>
</application>
</manifest>
But my app name appears beneath the icon on the screen is still "#string/title_activity_login"
I want it to be "#string/app_name"
Anyone can help?
Thanks in advance
It's not really weird, but just good to know :
the Android's launcher use the Intent Launcher Label or if not set, the activity's label and finally application's label
<intent-filter android:label="#string/app_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Naming my application in android
This is a bit weird in android...
App name is pretty much determined by first activity label.. or application label if it isn't set.
Just remove this line
android:label="#string/title_activity_login" from the Manifest file
I have two packages and within them are multiple activities. After seeing the replies in stackoverflow, i have made necessary changes in manifest file, still the apk doesnt runs.
Here is my sample manifest
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz.user.login"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SucessRetrieveCredActivity" >
</activity>
<activity android:name=".ResetPasswordMessageActivity" >
</activity>
<activity android:name=".ResetPasswordActivity" >
</activity>
<activity android:name="com.xyz.stylist.search.ServiceMap" >
</activity>
<uses-library
android:name="com.google.android.maps"
android:required="true" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
I have to import import com.hairologie.user.login.R; in ServiceMap activity, still it doesnt works. Earlier when ServiceMap and other activities were in same package, it worked just fine.
try this:
manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xyz"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".user.login.SplashActivity"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".user.login.SucessRetrieveCredActivity" >
</activity>
<activity android:name=".user.login.ResetPasswordMessageActivity" >
</activity>
<activity android:name=".user.login.ResetPasswordActivity" >
</activity>
<activity android:name=".stylist.search.ServiceMap" >
</activity>
<uses-library
android:name="com.google.android.maps"
android:required="true" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Write
android:name="com.yourpackage.activityName" in ManifestFile instead of
android:name = ".ActivityName"
it will solve the issue.
Change your package name in manifest to com.xyz
declare all the activities like
android:name=".stylist.search.ServiceMap"
android:name=".user.login.SplashActivity"
After that clean and build your project and run
I'm having trouble uploading an app to the market place. When the app is uploaded an error is displayed stating that the apk is not valid. But no reason is given.
I believe I have everything correct in the manifest file and I went through the process in eclipse to obtain a valid key (Export-Create a new key store- etc.)
The manifest file is posted below. Any help is appreciated, thanks.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.totaltodolist2"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8"></uses-sdk>
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<application android:icon="#drawable/newglobe" android:label="Total to Do List">
<activity android:name="AddNewContact"></activity>
<activity android:name="contactLookUp"></activity>
<activity android:name="EditContact"></activity>
<activity android:name="SevenListEntryActivity">
</activity>
<activity android:name="ItemOptions"></activity>
<activity android:name="MakeCallActivity" android:noHistory="true"></activity>
<activity android:name="PickDateActivity"></activity>
<activity android:name="SevenListActivity"></activity>
<activity android:name="SevenListDisplayActivity"></activity>
<activity android:name="TextActivity" android:noHistory="true"></activity>
<activity android:name="WebActivity" android:noHistory="true"></activity>
<activity android:name="Begin"> </activity>
<activity android:name="StartPage">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="SettingsActivity"></activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
</manifest>
If that is your whole manifest, you are missing some key elements.
For example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage.name.appname"
android:versionName="#string/version" android:versionCode="15">
<uses-sdk android:targetSdkVersion="7" android:minSdkVersion="7" />
<application android:label="#string/app_name" android:icon="#drawable/icon">
<activity spam here>
</application>
<define permissions here>
</manifest>