I use Android Studio
I build the app and play in device.
but, in device's normal display(like when phone open state),
I can't see the icon
In device Setting, I find the app in application manager,
but I can't see in normal display
this is my androidmanifest.xml
<application
android:allowBackup="true"
android:icon="#drawable/imagebutton_on"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Activity.SplashActivity"
android:theme="#style/AppTheme"
android:icon="#drawable/imagebutton_on"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="roid.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I embrassed of that
please help me
this is my full android-manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.thewell_dev.fourscompany">
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.BROADCAST_STICKY"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:allowBackup="true"
android:icon="#mipmap/imagebutton_on"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".Activity.SplashActivity"
android:theme="#style/AppTheme"
android:icon="#mipmap/imagebutton_on"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="roid.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT"></category>
<category android:name="android.intent.category.BROWSABLE"></category>
<data android:host="example.com"></data>
<data android:scheme="http"></data>
<data android:pathPattern="/.*"></data>
</intent-filter>
</activity>
<activity android:name=".Activity.LoginActivity">
</activity>
<activity android:name=".Activity.JoinActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.MainActivity"
android:theme="#style/ListTheme"
android:icon="#mipmap/imagebutton_on"
>
</activity>
<activity android:name=".Activity.CompanyActivity"
android:theme="#style/CompanyTheme"
android:configChanges="orientation|keyboardHidden|screenLayout|screenSize"
>
</activity>
<activity android:name=".Activity.CardActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.CardListActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.CardPreviewActivity">
</activity>
<activity android:name=".Activity.ManagementActivity">
</activity>
<activity android:name=".Activity.BeaconActivity">
</activity>
<activity android:name=".Activity.CompanyCardActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.PreferencActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.FileListActivity">
</activity>
<activity android:name=".Activity.PasswordChangeActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.RemoveUserActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.ProvisionActivity">
</activity>
<activity android:name=".Activity.QuestionActivity">
</activity>
<activity android:name=".Activity.ExpandActivity">
</activity>
<activity android:name=".Activity.CardPrecaptureActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.BookMarkActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.FindPasswordActivity"
android:theme="#style/SplashTheme"
>
</activity>
<activity android:name=".Activity.CardListDetailActivity">
</activity>
<activity android:name=".Activity.UploadCertificationActivity">
</activity>
<activity android:name=".Activity.UploadRewardActivity">
</activity>
<activity android:name=".Activity.OnOffProductActivity"
>
</activity>
<activity android:name=".Activity.OnOffCompanyActivity"
>
</activity>
</application>
</manifest>
App Icon should be placed in mipmap folder. Move your imagebutton_on in res\mipmap\ and Replace below code from application tag:
android:icon="#drawable/imagebutton_on">
With:
android:icon="#mipmap/imagebutton_on"
And resolve the following issue, as Markus Kauppinen mentioned:
<category android:name="roid.intent.category.LAUNCHER" />
To:
<category android:name="aroid.intent.category.LAUNCHER" />
Hope this helps.
Try by removing following lines from all activity tags
android:icon="#mipmap/imagebutton_on"
Keep it in only application tag.
Related
When people install my app, they get two apps (same app, two icons). Here's my AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.test">
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.INTERNET" />
<permission android:name="android.permission.MEDIA_CONTENT_CONTROL" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".SplashActivity"
android:theme="#style/AppTheme.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".SettingsActivity" />
<activity android:name=".HistoryActivity" />
<activity
android:name=".PaymentActivity"
android:screenOrientation="portrait" />
<activity
android:name=".PlayerActivity"
android:screenOrientation="portrait" />
<activity
android:name=".SearchActivity"
android:screenOrientation="portrait" />
<activity android:name=".VideoActivity" />
<activity
android:name=".FacebookActivity"
android:screenOrientation="portrait" />
<activity
android:name=".HomeActivity"
android:screenOrientation="portrait" />
<activity
android:name=".LibraryActivity"
android:screenOrientation="portrait" />
<activity
android:name=".LoginActivity"
android:screenOrientation="portrait" />
<activity
android:name=".BookDetailActivity"
android:screenOrientation="portrait" />
<activity
android:name=".BookActivity"
android:screenOrientation="portrait" />
<activity
android:name=".CategoryActivity"
android:screenOrientation="portrait" />
<activity
android:name=".TextActivity"
android:screenOrientation="portrait" />
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="#array/preloaded_fonts" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<service android:name="com.beraldo.playerlib.PlayerService" />
<receiver
android:name=".LaunchPlayerBroadcastReceiver"
android:exported="true">
<intent-filter>
<action android:name="com.beraldo.playerlib.LAUNCH_PLAYER_ACTIVITY" />
</intent-filter>
</receiver>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
</application>
</manifest>
Any help would be greatly appreciated.
You have:
<activity
android:name=".SplashActivity"
android:theme="#style/AppTheme.SplashScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
and you have:
<activity
android:name=".MainActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Both have the <intent-filter> that says you want those activities to have icons in the launcher. If that is not what you want, remove the <intent-filter> from one of them.
I can't seem to launch my application. It gives me an error like this: Error running second Activity: The activity must be exported or contain an intent-filter. Is there anything wrong with my manifest?
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.bill.myapplication1.MainActivity"
android:label="#string/app_name"
android:exported="true">>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.bill.myapplication1.SecondActivity"
android:label="#string/title_activity_second" >
</activity>
</application>
look there ,"android:exported="true">>", there is two ">"
change this in your manifest file
<activity
android:name="com.bill.myapplication1.MainActivity"
android:label="#string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.bill.myapplication1.MainActivity"
android:label="#string/app_name"
android:exported="true">>
You have double > near exported = "true"
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.bill.myapplication1.MainActivity"
android:label="#string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.bill.myapplication1.SecondActivity"
android:label="#string/title_activity_second" >
</activity>
</application>
I have created an simple app with a few activities. After successful installation I can't open the app. I can just see it in device's apps.
Yes of course a read all the answers telling "You have to set launcher activity". But I set launcher activity.
Here is AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
</application>
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.SearchActivity"
android:label="#string/search_activity">
</activity>
<activity
android:name=".activities.CustomerActivity"
android:label="#string/customer_activity">
</activity>
<activity
android:name=".activities.CreditActivity"
android:label="#string/credit_activity">
</activity>
<activity
android:name=".activities.PrintReceiptActivity"
android:label="#string/print_receipt_activity">
</activity>
<activity
android:name=".activities.ProductActivity"
android:label="#string/product_activity">
</activity>
Never before happened to me... Can you give me some advice? Thanks a lot
All your activities are required to be defined within the <application> tag.
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<!-- Add activites here -->
</application>
Your manifest should look like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
...
...
</application>
</manifest>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.SearchActivity"
android:label="#string/search_activity">
</activity>
<activity
android:name=".activities.CustomerActivity"
android:label="#string/customer_activity">
</activity>
<activity
android:name=".activities.CreditActivity"
android:label="#string/credit_activity">
</activity>
<activity
android:name=".activities.PrintReceiptActivity"
android:label="#string/print_receipt_activity">
</activity>
<activity
android:name=".activities.ProductActivity"
android:label="#string/product_activity">
</activity>
</application>
</manifest>
try Replacing your manifest with this..
Change your AndroidManifest.xml structure to -
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="cz.jacon.davodani"
android:versionCode="0"
android:versionName="0.1">
<application
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme">
<activity
android:name=".activities.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.SearchActivity"
android:label="#string/search_activity">
</activity>
<activity
android:name=".activities.CustomerActivity"
android:label="#string/customer_activity">
</activity>
<activity
android:name=".activities.CreditActivity"
android:label="#string/credit_activity">
</activity>
<activity
android:name=".activities.PrintReceiptActivity"
android:label="#string/print_receipt_activity">
</activity>
<activity
android:name=".activities.ProductActivity"
android:label="#string/product_activity">
</activity>
</application>
</manifest>
All activities tag must be placed inside <application> tag and it should be placed inside <manifest> tag.
I am having this problem.
I created a new xml layout (splash screen) and in manifest set it as Launcher category.
I did this before tons of time but it never happened before.
When MainActivity is LAUNCHER categpry and I run Spalsh Activity via intent it works.
Doing opposite I get error No launcher activity found.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".SecondActivity"
android:label="Second Activity" >
<intent-filter>
<action android:name="net.learn2develop.SECONDACTIVITY" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".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>
</application>
No problem in this one, but if I modify it to
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".SecondActivity"
android:label="Second Activity" >
<intent-filter>
<action android:name="net.learn2develop.SECONDACTIVITY" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
I get error.
try with following
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".SecondActivity"
android:label="Second Activity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="net.learn2develop.SECONDACTIVITY" /> <!--(or android.intent.action.VIEW) -->
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
try this:
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".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=".SecondActivity"
android:label="Second Activity" >
</activity>
</application>
This is my android manifest and for some reason my MainActivity does not start first. The activity that starts first whenever I run the application is RegisterActivity. Can anyone help me figure out why?
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.indigohate"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<permission
android:name="com.indigohate.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.indigohate.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<service android:name="com.indigohate.GCMIntentService" />
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.indigohate" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.indigohate" />
</intent-filter>
</receiver>
<activity
android:name="com.indigohate.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.indigohate.RegisterActivity"
android:launchMode="singleTop" />
<activity
android:name="com.indigohate.UserRegister"
android:launchMode="singleTop" />
<activity
android:name="com.indigohate.LoginActivity"
android:launchMode="singleTop" >
</activity>
<activity
android:name="com.indigohate.RideRequest"
android:label="#string/title_activity_ride_request" >
</activity>
<activity
android:name="com.indigohate.TimePickerFragment"
android:label="#string/title_activity_time_picker_fragment" >
</activity>
<activity
android:name="com.indigohate.SearchResultsListActivity"
android:launchMode="singleTop" />
<activity
android:name="com.indigohate.LoadingScreenActivity"
android:label="#string/title_activity_loading_screen" >
</activity>
<activity
android:name="com.indigohate.HomeActivity"
android:label="#string/title_activity_home" >
</activity>
<activity
android:name="com.indigohate.LostPasswordActivity"
android:label="#string/title_activity_lost_password" >
</activity>
<activity
android:name="com.indigohate.RideOfferActivity"
android:label="#string/title_activity_ride_offer" >
</activity>
<activity
android:name="com.indigohate.StartRideActivity"
android:label="#string/title_activity_start_ride" >
</activity>
<activity
android:name="com.indigohate.StopRideActivity"
android:label="#string/title_activity_stop_ride" >
</activity>
<activity
android:name="com.indigohate.CalendarActivity"
android:label="#string/title_activity_calendar" >
</activity>
<activity
android:name="com.indigohate.ProfileActivity"
android:label="#string/title_activity_profile" >
</activity>
<activity
android:name="com.indigohate.MakeCommentActivity"
android:label="#string/title_activity_make_comment" >
</activity>
<activity
android:name="com.indigohate.PaymentInformationActivity"
android:label="#string/title_activity_payment_information" >
</activity>
<activity
android:name="com.indigohate.RideHistoryActivity"
android:label="#string/title_activity_ride_history" >
</activity>
</application>
</manifest>
It's because you kept this attribute in your RegisterActivity
android:launchMode="singleTop"
Remove all these launchmodes in all activities. Keep it only in your MainActivity:
<activity
android:name="com.indigohate.MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The starting activity contains <category android:name="android.intent.category.LAUNCHER" /> to ensure that it's a launcher activity when an app starts.