Android splash screen app gererate 2 APK files - android

Below xml is used to make a splash screen in Android. I have tested and is working fine. But when I generate APK file and install it will install 2 apps?
One is with splash screen and another one is without splash screen.Why? Sorry, I'm new in Android and just follow the tutorial.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<!-- Splash screen -->
<activity
android:name="info.androidhive.androidsplashscreentimer.SplashScreen"
android:label="#string/app_name"
android:screenOrientation="portrait"
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>
<!-- Main activity -->
<activity
android:name="info.androidhive.androidsplashscreentimer.MainActivity"
android:label="#string/app_name" >
</activity>
</application>

Label tag should only use with application tag,
android:label="#string/app_name"
So remove this label tag from:
<!-- Splash screen -->
<activity
android:name="info.androidhive.androidsplashscreentimer.SplashScreen"
android:label="#string/app_name" //remove this
android:screenOrientation="portrait"
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>
<!-- Main activity -->
<activity
android:name="info.androidhive.androidsplashscreentimer.MainActivity"
android:label="#string/app_name" //remove this >
</activity>

Related

Application icon in Genymotion

Hiii, I'm develop two class for two xml layout
But when it run, application icon in my genymotion appear double..
Each one icon contain one class from application that i make
This is my manifest :
....
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="4452000"/>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="myapikey"/>
<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=".MainActivity2"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
....
How do I make the application icons into one icon ?
just remove the <intent-filter> from the activity you do not want to appear

Android app doesn't load up on the emulator

My app has no errors in it however when i come to run it on the emulator then the emulator runs but doesn't show my app and comes up with this
error message -
[2013-03-15 09:47:57 - Writees] No Launcher activity found!
[2013-03-15 09:47:57 - Writees] The launch will only sync the
application package on the device!
This is my manifest -
?xml version="1.0" encoding="utf-8"?>
android:allowBackup = "True">
<activity
android:name="com.example.writees.LoginActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</intent-filter>
</activity>
<!-- dashboard Activity -->
<activity
android:name="com.example.writees.DashboardActivity"
android:label="dashboard" >
</activity>
<!-- main Activity -->
<activity
android:name="com.example.writees.MainActivity"
android:label="main" >
</activity>
<!-- Register Activity -->
<activity
android:name="com.example.writees.RegisterActivity"
android:label="Register New Account" >
</activity>
<!-- Book Activity -->
<activity
android:name="com.example.writees.BookActivity"
android:label="book" >
</activity>
/>
No Launcher activity found!
You did not set any activity as a Launcher in AndroidManifest.xml
<activity android:name=".ExampleActivity" 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 have to make any one activity that you want to launch first as Launcher activity.
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.helloworld.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>

Android application upload error

i'm having a hard time uploading my upgraded version to the developers console. I've incremented the versionCode and the versionName and i used the same details to exporting the apk file as i did before.
when i try to upload the new file all it says that there's a unexpected error and asks me to choose another file.
does anyone have any hints or even know how to fix this error? would the problem be in my manifest?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kev.harris"
android:versionCode="2"
android:versionName="1.1" >
<uses-sdk android:minSdkVersion="7" />
<application
android:icon="#drawable/man21"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar"
android:debuggable="false">
<activity
android:name=".AssignmentActivity"
android:label="#string/app_name"
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=".MainMenu"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="kev.harris.MAINMENU" />
<category android:name="android.intent.category.DEFAULT" />
<!-- makes it so that the code is recognised but is to run in the background -->
</intent-filter>
</activity>
<activity
android:name=".MainGame"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="kev.harris.MainGame" />
<category android:name="android.intent.category.DEFAULT" />
<!-- makes it so that the code is recognised but is to run in the background -->
</intent-filter>
</activity>
<activity
android:name=".Savefile"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- saving stuff -->
</activity>
<activity
android:name=".Continues"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="kev.harris.CONTINUES" />
<category android:name="android.intent.category.DEFAULT" />
<!-- makes it so that the code is recognised but is to run in the background -->
</intent-filter>
<!-- continuing -->
</activity>
<activity
android:name=".Dead"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".NewGame"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- used for the choice between male and female -->
</activity>
<activity
android:name=".Male"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for choosing the standard or custom picture -->
</activity>
<activity
android:name=".CMPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the male custom picture -->
</activity>
<activity
android:name=".MPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the male normal picture -->
</activity>
<activity
android:name=".Female"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the female choice of picture -->
</activity>
<activity
android:name=".CfPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the female custom picture -->
</activity>
<activity
android:name=".FPicture"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<!-- for the female normal picture -->
</activity>
</application>
R you including .apk extension with your file name.When you are exporting.

Android App has more than one launcher

So I have an app, with 2 activities. For some reason I am getting 2 launcher icons, one for each activity, but I only want one!
The Game activity had an intent-filter which i removed. I also uninstalled the app and reinstalled it from scratch but its still coming up with both launchers :(
Manifest below
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Game"
android:label="#string/title_activity_game" >
</activity>
</application>
You need to remove the label tag from your second Activity.
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Game" >
</activity>
</application>

App Unable to Find Launcher Activity

I have just started to develop a brand new application and I have two Activities set up one which displays the Splash Screen and another the Main one. Here is the manifest file:
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".Splash"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.SPLASH" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
I tried changing android.intent.action also removing the DEFAULT Category line from Main also placing the Splash Activity setup above main.
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".Main"
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=".Splash"
android:label="#string/app_name" >
</activity>
</application>
Just realized the .MAIN in action and .LAUNCHER should be in the same activity , it's working now!
check this
Android: No Launcher activity found! was working before

Categories

Resources