ERROR: Multiple entries with same key: android:appComponentFactory=REPLACE and android:appComponentFactory=REPLACE
this error comes when i try to sync the gradle.
this error is after i updated android studio to latest version
here is mainfest
<?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.hoogle.news">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<application
android:icon="#mipmap/ic_app"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_app_round"
android:supportsRtl="true"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="#style/Theme.AppCompat.NoActionBar"
tools:replace="android:appComponentFactory,android:appComponentFactory,android:appComponentFactory">
<activity
android:name=".FullscreenActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="#string/app_name"
android:theme="#style/FullscreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".isNetworkAvailable"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat.Light.NoActionBar.FullScreen">
<intent-filter>
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="#style/Theme.AppCompat.Light.NoActionBar.FullScreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
</application>
</manifest>
just delete this line under application to solve multiple error entries and merged mainfest error
tools:replace="android:appComponentFactory,android:appComponentFactory,android:appComponentFactory">
Related
I can generate apk using assembleRelease but when I run bundleRelease it throws an error saying
Execution failed for task ':app:packageReleaseBundle'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
At most one element with namespace '' was expected, but 2 were found.
> At most one element with namespace '' was expected, but 2 were found.
```<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.finder"
>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".MainApplication"
android:networkSecurityConfig="#xml/network_security_config"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="finder" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
<application>
<!-- You will only need to add this meta-data tag, but make sure it's a child of application -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>
<!-- You will also only need to add this uses-library tag -->
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
</application>
</manifest>```
In your Manifest File, you have defined application tag two-times, but usually, an application has only one application in the manifest.
You need to replace your manifest file with this:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.finder"
>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application
android:name=".MainApplication"
android:networkSecurityConfig="#xml/network_security_config"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTask"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="finder" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<!-- You will only need to add this meta-data tag, but make sure it's a child of application -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>
<!-- You will also only need to add this uses-library tag -->
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
</application>
i am getting this error while developing my app, every thing works fine suddenly this error happened while run the app and checking the changes, as i told everything works fine suddenly this happen i didn't change anything in Manifest.xml file., this is the manifest file kindly help me out.
this is the error i am getting
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.habitreminder">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<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=".OnboardingPackage.OnboardingSlider"
android:theme="#style/Theme.AppCompat.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".userhome.UserDashboardActivity"
android:theme="#style/Theme.AppCompat.NoActionBar"
android:label="#string/title_activity_user_dashboard">
</activity>
<activity
android:name=".signup.UserCalenderSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".signup.UserMapSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".signup.UserDetailsSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".login.LoginActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".LoginSignup.LoginSignupActivity"
android:theme="#style/Theme.AppCompat.NoActionBar" />
<activity
android:name=".MainActivity"
android:theme="#style/Theme.AppCompat.NoActionBar">
</activity>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCy-z3OoXACHh_MKBLoCPjdNo2ySD1ogU8" />
<meta-data android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<activity android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name" />
<activity
android:name="com.facebook.CustomTabActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<activity android:name=".ProfileSettings.changeprofilename"
android:theme="#style/AppThemepopup"/>
</application>
</manifest>
Is your activity declared in ŮŽAndroidManifest like this ?
<activity
android:name=".launchactivity"
android:label="#string/title_activity_login"
android:windowSoftInputMode="stateHidden" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
enter image description here
I just close the Android Studio And delete 2 folders name caches and tmp and start the Android Studio again and it worked.
When i install my android application on the device, the AppIcon will appear twice.
This means: there are two separate app-icons. Both icons launch the same app version. If I remove one app-icon, the other disappears also. If i reinstall them, it appears twice again.
How can i avoid this?
This is my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.******"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:theme="#style/AppTheme">
<meta-data android:name="com.bugsnag.android.API_KEY"
android:value="524b0194108e90ae383189e509746766"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity
android:name=".SplashActivity"
android:theme="#style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It's because of the intent-filter. Only one activity should have
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Any activity having this intent filter will be shown in the launcher.
Manifest:
This was working fine before some time. Now it shows 0-supported devices!
Please help me on this.
Shows these features on console though I am not using it.
android.hardware.screen.PORTRAIT
android.hardware.TOUCHSCREEN
android.hardware.WIFI
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.irb.wallpro"
android:versionCode="5"
android:versionName="1.0.5" >
<uses-sdk
android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- Include next permission if you want to allow UIL to cache images on SD card -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS" />
<uses-permission android:name="android.permission.SET_WALLPAPER" />
<application
android:name="com.irbrothers.wallpro.ui.WallProApplication"
android:allowBackup="true"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.irbrothers.wallpro.ui.SplashActivity"
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="com.irbrothers.wallpro.ui.PropertiesActivity"
android:configChanges="orientation"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.irbrothers.wallpro.ui.HomeActivity"
android:configChanges="orientation|screenSize"
android:launchMode="singleTask" >
</activity>
<activity
android:name="com.irbrothers.wallpro.ui.EULA"
android:configChanges="orientation|screenSize"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.irbrothers.wallpro.ui.AboutActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:windowSoftInputMode="adjustPan" >
</activity>
<activity
android:name="com.startapp.android.publish.list3d.List3DActivity"
android:taskAffinity="com.app.irbrothers.wallpro.AppWall"
android:theme="#android:style/Theme" />
<activity
android:name="com.startapp.android.publish.AppWallActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:taskAffinity="com.app.irbrothers.wallpro.AppWall"
android:theme="#android:style/Theme.Translucent" />
<service android:name="com.irbrothers.wallpro.alarm.NotificationService" />
<receiver android:name="com.irbrothers.wallpro.recievers.NotificationAlarmReciever" >
<intent-filter>
<action android:name="com.irbrothers.notification" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DATE_CHANGED" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.TIMEZONE_CHANGED" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.TIME_SET" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.TIME_TICK" />
</intent-filter>
</receiver>
</application>
</manifest>
Solved
Do not use any library which is already present in framework. Ex: "json-simple" here.
I trying to use C2DM in my android application, but after I added it I can't install the application. I get this error "Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED". But I can't see whats wrong.
Anyone that know what I have done wrong?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="Wordy.Game"
android:versionCode="1"
android:versionName="0.1"
android:installLocation="preferExternal">
<uses-sdk android:minSdkVersion="8" />
<permission
android:name="Wordy.Game.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission
android:name="Wordy.Game.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application android:label="#string/app_name" android:icon="#drawable/wordy">
<activity android:name="Main"
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>
<receiver
android:name=".C2DMRegistrationReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter >
<action android:name="com.google.android.c2dm.intent.REGISTRATION" >
</action>
<category android:name="Wordy.Game" />
</intent-filter>
</receiver>
<receiver
android:name=".C2DMRegistrationReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter >
<action android:name="com.google.android.c2dm.intent.RECEIVE" >
</action>
<category android:name="Wordy.Game" />
</intent-filter>
</receiver>
<activity android:name="Result" android:label="#string/app_name" android:screenOrientation="portrait" />
<activity android:name="PlayField" android:label="#string/app_name" android:screenOrientation="portrait" />
<activity android:name="Game" android:label="#string/app_name" android:screenOrientation="portrait" />
<activity android:name="News" android:label="#string/app_name" android:screenOrientation="portrait" />
<activity android:name="PlayOnline" android:label="#string/app_name" android:screenOrientation="portrait" />
<activity android:name="UsersOnline" android:label="#string/app_name" android:screenOrientation="portrait" />
</application>
</manifest>
I finally found whats wrong, the package name on the application was not allowed to start with capital letter.
try prefixing your activityies with a . or the full package name:
<activity android:name="com.gizm0.YourClass"></activvity>
or
<activity android:name=".YourClass"></activvity>