Android resource linking failed when i deployment target - android

I get this error when I select my android device. I'm using it for game testing with libgdx.
Android resource linking failed
C:\Users\oguzh\AndroidStudioProjects\Flying Smurfs\android\build\intermediates\ınstant_run_merged_manıfests\debug\processDebugManifest\instant-run\AndroidManifest.xml:11: error: attribute android:appCategory not found.
error: failed processing manifest.
And here is my manifest xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.oguzhanaygun.flyingsmurfs" >
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:isGame="true"
android:appCategory="game"
android:label="#string/app_name"
android:theme="#style/GdxTheme" >
<activity
android:name="com.oguzhanaygun.flyingsmurfs.AndroidLauncher"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

add tools:targetApi="o" to the application node and target an API level >= 26
... or remove the android:appCategory="game", when targetting an API level < 26.

Related

Manifestation merger failed with multiple errors, see logs

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>

Gradle project sync failed error after invalidating caches/restart?

I am running android 3.4.1 and all I did was invalidate caches and restart now I get the error gradle sync issues and this
ERROR: Failed to parse XML in C:\Users\J.Robinson\AndroidStudioProjects\App\app\src\main\AndroidManifest.xml
ParseError at [row,col]:[17,64]
Message: expected start or end tag
I've google stack for an hour and a half now and nothing seems to work. How do I solve this?
Image of error in question
Manifest.XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.jstudios.curbyourmeme">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="App"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="app"
android:theme="#style/AppTheme.NoActionBar">
android:screenOrientation="portrait"
android:configChanges="orientation|keyboardHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Remove the > symbol in the line
android:theme="#style/AppTheme.NoActionBar">
It was causing the error

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"

No resource identifier found for attribute 'depurables' in package 'android'

I finished of developing my app but when a try to generate a singned APK Android Studio shows:
Error:(11) No resource identifier found for attribute 'depurables' in package 'android'
I remove de android:depurables="true" (I know that I should let the identifier there but I whanna try) but Android Studio put it again in the AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mosaicogeek.skintigth.learning.vochostest"
android:versionCode="5"
android:versionName="Beta 2" >
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:depurables="false"
android:icon="#mipmap/ic_launcher"
android:label="Vochos"
android:supportsRtl="true"
android:theme="#style/AppTheme" >
<activity android:name="mosaicogeek.skintigth.learning.vochostest.MainActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="android.support.v7.widget.TestActivity"
android:label="RecyclerViewTestActivity" />
</application>
</manifest>
There isn't an attribute called depurables, which is why you get that error. I doubt Android Studio would be auto adding that back in the manifest. Find all occurrences of "depurables" in your project to see if you get a hint of what is going on. Edit-->Find-->Find In Path

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