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>
Related
I'm a beginner in Android.
Every time when I open class teacher's project to my system it shows this error.
Error running app: Default activity not found.
What should I do to match the same project as my teacher's?
I've tried many solutions.
My Manifest file is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.assigncheckbox">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
maybe it happen because you didn't add this activity to your AndroidManifest.xml
<activity
android:name=".yourActivity"
/>
I cannot see app icon and app name on my app on my phone/emulator. I can only start it using run button inside android studio. So when i close the app on my phone there is i cannot find i icon shortcut. The app is however shown under setting and i can uninstall it from there.
my manifest has
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#drawable/ic_card_giftcard_black_24dp"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name="com.mindedges.easyquiz.easyquiz.LoginActivity"
android:label="#string/title_activity_login"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Why am i not seeing a shortcut for app?There is no way by which i can start the app once i close it.
You need to add your Icon tags:
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
in you application tag.
Screen shot of installed app section I created an small puzzle app. I created the android:label as Math. After installing the app in menu grid it shows as "Math", but in the installed apps section it shows the package name. Pls help me out.
Manifest code
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tam.prasanth.MathFunDemo" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/logo"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
the application name (label) should be within the application tag and not the activity.
<application
android:label="#string/app_name"
>
....
Please specify android:label="#string/app_name" tag in application tag. And also set value of app_name in string.xml to your application name (Math).`
I am working with Android Studio 1.0 when suddenly, out of the blue I can not run my app on my phone because it is telling me that it can not find the default activity.
Changing the "default activity" to the specific activity I want to launch, ends in the error that apparently the activity I selected is not declared in AndroidManifest.xml.
Which also isn't true, because I did declare it in the .xml, I didn't remove it or add something new, it always has been there and now it doesn't want to work.
Thank you for reading and maybe answering / commenting. :D
Edit: This is my AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pack.aproject" >
<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=".SecondPageActivity">
</activity>
</application>
</manifest>
you may need to refresh the IDE's cache.
File -> Invalidate Caches / Restart...
I want to add another project to my app. But it uses its own "application tag" in AndroidManifest file. And one of its class extends Application
So the problem is I use my own "application" preferences. How can I integrate this new project's "application" preferences to mine ? Will I change somethings on "class extends Application" ?
<activity android:name="com.my.other.project.package.name.MyClassName">
by this you could add your other project activity.
Only the <manifest> and <application> elements are required, they each must be present and can occur only once.
<?xml version="1.0" encoding="utf-8"?>
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.example.animal.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="myOtherPackageName.MyClassName"/> // here where you put your other package name.
</application>