Manifestation merger failed with multiple errors, see logs - android

I've checked the merged manifest to find these errors
(Note that I'm a beginner android developer so every problem in android studio seems like the end of the world to me. Please help me solve this error, thanks in advance)
ERROR: tools:replace specified at line:6 for attribute android:appComponentFactory, but no new value specified App_Name.app main manifest (this file), line 5
ERROR: Validation failed, exiting App_Name.app main manifest (this file)
My Manifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.syddhoo.bookapp">
<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/Theme.BookApp"
tools:replace="android:appComponentFactory">
<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>

Related

Every time when i open class teacher's project to my system it shows this error.Error running app: Default activity not found

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"
/>

MainActivity unresolved class error with android studio

Im taking the udacity coarse and for some reason android studio wont recognize my MainActivity class. Ive tried cleaning the project, rebuilding and making sure that the names were correct but nothing has solved my problem.
Android Manifest code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="androidedx.example.activitylifecycle">
<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=".Activity1"></activity>
<activity android:name=".Activity2" />
<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>
Found the problem, this package name within the code I had to paste
package com.example.android.cookies;
Im not sure why specifically this caused the problem but atleast I solved it.

Android get Manifest merger failed Error on using tools:replace

in my project as far as i'm using more library i have to use tools:replace for overriding some features such as supportsRtl, when i add tools name space and use tools:replace="android:supportsRtl,android:allowBackup" on application tag i get this error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
manifest content:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.myapp.androidapp">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:name=".APP"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:roundIcon="#mipmap/ic_launcher_round"
android:theme="#style/AppTheme"
tools:replace="android:supportsRtl,android:allowBackup">
<activity android:name=".Ui.ActivityStartUpApplication">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".Ui.ApplicationRobot.view.ActivityRegisterRobot"
android:configChanges="screenSize|orientation"/>
<activity
android:name=".Ui.ActivityChannelContent.view.ActivityChannelContent"
android:configChanges="screenSize|orientation">
</activity>
<activity
android:name=".Ui.ActivityMain.view.ActivityMain"
android:configChanges="screenSize|orientation"/>
</application>
</manifest>
problem resolved by adding
android:supportsRtl="false"
before
tools:replace="android:supportsRtl,android:allowBackup"

Manifest XML not well-formed (invalid token) Android

So, I think I accidentally deleted something from the manifest, but I am using AIDE and I no longer have the option to undo it. I've looked through examples on StackOverflow and throughout the general Internet, trying to find the problem with the manifest, but nothing seems to be missing. The error is showing after the android:label line in <activity>.
Before supposedly deleting something, the app compiled and ran as expected. Thanks to anyone that can help.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.bitcoin.app" >
<uses-permission android:name = "android.permission.INTERNET"/>
<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>
</application>
</manifest>
It means there is a compilation error in your XML file, something that shouldn't be there: a spelling mistake/a spurious character/an incorrect namespace.
Check your #string file and XML file.
Eg: android:text="#string/hello";
a semicolon that shouldn't be there after this line

Manifest error while implementing MaterialNavigationDrawer

I am trying to integrate this Material Drawer to my project, however i am facing a Manifest error. I have tried changing the minSdk and targetSdk as it is suggested on some similar questions but with no success.
Here is the error i get:
Error:Execution failed for task ':app:processDebugManifest'.
> Error: [project_path\build\intermediates\exploded-aar\it.neokree\MaterialNavigationDrawer\1.2.9\AndroidManifest.xml:8] Invalid instruction 'overrideLibrary', valid instructions are : REMOVE,REPLACE,STRICT
Here is my app manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.package.name">
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".activities.SplashScreenActivity"
android:configChanges="orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:theme="#style/NavigationDrawer" />
</application>
</manifest>
I am using Android Studio (Beta) 0.8.0.
What is causing this error?
I solved the error by going to the MaterialDrawer library Manifest and removing the uses-sdk:
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="21"
tools:overrideLibrary="at.markushi.ui" >
</uses-sdk>
I am not sure if that will bring up any error later on but at least it solve the problem i had

Categories

Resources