The Icon App dosen't appear in my activities - java

when I update my SDK the icon app doesn't appear in the activities I tried all the solution on the internet but nothing happened .. I tried also to put " android:icon" in each activities nothing change also made a custom actionbar also nothing change .. please any help?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package=""
android:installLocation="auto"
android:versionCode="1"
android:versionName="1.0" >
"
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/CustomActionBarTheme" >
<activity
android:name=".Main"
android:label="#string/app_name"
android:theme="#style/NoActionBarTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Option"
android:label="#string/title_activity_option" >
</activity>
<activity
android:name=".CustomList"
android:label="#string/title_activity_custom_list" >
</activity>
<activity
android:name=".Social"
android:label="#string/title_activity_social" >
</activity>
<activity
android:name=".About"
android:label="#string/title_activity_about" >
</activity>
<activity
android:name=".ActionBar"
android:label="#string/title_activity_action_bar" >
</activity>
</application>
</manifest>

Related

AAPT: error: unexpected element <activity> found in <manifest><application><activity>

It specifies
ERROR:C:\Users\rafaw\OneDrive\Desktop\pp_rafa\pp_rafa\remindertest\app\build\intermediates\packaged_manifests\debug\AndroidManifest.xml:27: AAPT: error: unexpected element <activity> found in <manifest><application><activity>.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.remindertest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="31" />
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:debuggable="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="true"
android:theme="#style/Theme.ReminderTest" >
<activity
android:name="com.example.remindertest.Activity2"
android:exported="false" />
<activity
android:name="com.example.remindertest.MainActivity"
android:exported="true" >
<activity android:name="com.example.remindertest.DestinationActivity" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="com.example.remindertest.AlarmReceiver" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="com.example.remindertest.androidx-startup"
android:exported="false" >
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-data
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
android:value="androidx.startup" />
</provider>
</application>
</manifest>
I can launch my app/emulator though but a few features does not work. Do you guys know what's happening? Also when I open AndroidManifest it's normal but when I launch emulator it turns red, if I exit and open again it's back to normal yellow, though there is a red underline under the destination activity problem
update this manifest file with your manifest, and rebuild.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.remindertest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="31" />
<application
android:allowBackup="true"
android:appComponentFactory="androidx.core.app.CoreComponentFactory"
android:debuggable="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:testOnly="true"
android:theme="#style/Theme.ReminderTest" >
<activity
android:name="com.example.remindertest.Activity2"
android:exported="false" />
<activity android:name="com.example.remindertest.DestinationActivity" />
<activity
android:name="com.example.remindertest.MainActivity"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="com.example.remindertest.AlarmReceiver" />
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="com.example.remindertest.androidx-startup"
android:exported="false" >
<meta-data
android:name="androidx.emoji2.text.EmojiCompatInitializer"
android:value="androidx.startup" />
<meta-data
android:name="androidx.lifecycle.ProcessLifecycleInitializer"
android:value="androidx.startup" />
</provider>
</application>
</manifest>

changed package name, now AndroidManifest.xml doesn't work

So, I tried to change the package by the following steps I found elsewhere on StackOverflow website:
create a new package
refractor the package to the new package
changing the package line in the form for the AndroidManifest.xml
btw I'm using Eclipse, if that's relevant.
However, I'm getting an error message in the AndroidManifext.xml file:
Parser exception for /GameProj/AndroidManifest.xml: The prefix "com.p.gameproj.Dataid" for attribute "com.p.gameproj.Dataid:name" associated with an element type "activity" is not bound At line 31.
Can someone tell me what the error message means?
Also, here's the AndroidManifest.xml file, if it's relevant:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.p.gameproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.p.gameproj.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
com.p.gameproj.Creditsname=".Credits"
android:label="#string/title_activity_credits" >
</activity>
<activity
com.p.gameproj.Dataid:name=".Data"
android:label="#string/title_activity_data" >
</activity>
<activitycom.p.gameproj.CharacterPageandroid:name=".CharacterPage"
android:label="#string/title_activity_character_page" >
</activity>
<activity
com.p.gameproj.StatPageame=".StatPage"
android:label="#string/title_activity_stat_page" >
</activity>
<activitycom.p.gameproj.MapMain android:name=".MapMain"
android:label="#string/title_activity_map_main" >
</activity>
com.p.gameproj.ScreenLocvity
android:name=".ScreenLoc"
android:label="#string/title_activity_screen_loc"com.p.gameproj.BattleScreen/activity>
<activity
android:name=".BattleScreen"
android:label="#string/title_activity_battle_screen" >
</com.p.gameproj.InvScreen
<activity
android:name=".InvScreen"
android:label="#string/title_activity_inv_screen"com.p.gameproj.ShopThing </activity>
<activity
android:name=".ShopThing"
android:label="#string/title_activity_shop_thing" >
</activity>
</application>
</manifest>
Looks like something went wrong during your package name change. Probably a bad find/replace action. There are a several invalid attributes and elements in the AndroidManifest.xml file such as the following:
<activity
com.p.gameproj.Dataid:name=".Data"
android:label="#string/title_activity_data" >
Notice the com.p.gameproj.Dataid:name=".Data". It should be android:name=".Data".
Once you fix all these bad values it should work again.
This should be close
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.p.gameproj"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.p.gameproj.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=".Credits"
android:label="#string/title_activity_credits" >
</activity>
<activity
android:name=".Data"
android:label="#string/title_activity_data" >
</activity>
<activity
android:name=".CharacterPage"
android:label="#string/title_activity_character_page" >
</activity>
<activity
android:name=".StatPage"
android:label="#string/title_activity_stat_page" >
</activity>
<activity
android:name=".MapMain"
android:label="#string/title_activity_map_main" >
</activity>
<activity
android:name=".ScreenLoc"
android:label="#string/title_activity_screen_loc">
</activity>
<activity
android:name=".BattleScreen"
android:label="#string/title_activity_battle_screen" >
</activity>
<activity
android:name=".InvScreen"
android:label="#string/title_activity_inv_screen">
</activity>
<activity
android:name=".ShopThing"
android:label="#string/title_activity_shop_thing" >
</activity>
</application>
</manifest>

Why doesn't my Manifest file declare a java package?

I can't seem to find an answer to this, so I guess I'll ask it myself. No matter what I try, Eclipse claims that my AndroidManifest.xml file doesn't declare a java package. Here's my code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:name="hess.jacob.spindoctor"
android:versionCode="19"
android:versionName="4.4" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="hess.jacob.spindoctor.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>
</manifest>
Maybe someone can find the problem, and suggest a solution. I'd gladly appreciate it.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="hess.jacob.spindoctor"
android:versionCode="19"
android:versionName="4.4" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="hess.jacob.spindoctor.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>
</manifest>
Yes , Package name is missing
You have set the name , not the package.
android:name="hess.jacob.spindoctor"
It should be
package="hess.jacob.spindoctor"

Assistance Android Manifest Please

I need a hand with the Android Manifest file.
I have 4 java files called: MainActivity, Splash, TextPlay and Menu. I want the Splash file to be displayed first. (I have it set for 5 seconds)
I then want the Menu to be displayed(I have the rest of the files displayed on Menu page.)
The app also wont debug on the emulator and im guessing its the manifests fault.
Can someone help me achieve this, Thanks!!
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.intigerdev.numberapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Menu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAINACTIVITY" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.intigerdev.numberapp.MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MENU" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TextPlay"
android:label="#string/app_name" >
</activity>
</application>
</manifest>
You will have to move between activities on your own. The manifest doesn't do that for you.. if you want your app to start on the Splash screen use this manifest instead:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.intigerdev.numberapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash"
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=".Menu"
android:label="#string/app_name"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"/>
<activity
android:name=".TextPlay"
android:label="#string/app_name"/>
</application>
</manifest>
OnCreate of the Splash activity (stackoverflow.com/a/6489385/736496):
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
finish();
Intent intent = new Intent(Splash.this, Menu.class);
startActivity(intent);
}
}, 5000);
}

Launcher activity not starting first

The title explains it pretty much, here is the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.craym.vulcrum.firstgametnb"
android:versionCode="1"
android:versionName="1.0" >
<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=".Splash"
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=".StartingPoint"
android:label="#string/app_name" >
<intent-filter>
<action android:name="eu.craym.vulcrum.STARTINGPOINT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Yet whenever I run this application, the StartingPoint classed is called first:
[2013-03-09 18:36:40 - FirstGameTNB] Starting activity eu.craym.vulcrum.firstgametnb.StartingPoint on device emulator-5554
Why is this happening? I thought the MAIN and LAUNCHER were supposed to make it so the Splash class gets called first, but this never happens. Note that when I delete the StartingPoint activity, it goes to Splash.
You're right. You may try a clean on your project.
android.intent.action.MAIN: Start as a main entry point, does not
expect to receive data.
Source

Categories