I have this error when I try to build my app:
Merging Errors: Warning
activity#com.google.firebase.auth.internal.FederatedSignInActivity#android:launchMode
was tagged at AndroidManifest.xml:24 to replace other declarations but
no other declaration present app main manifest (this file), line 23
<?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.dm.bloggerapp">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET"/>
<application
tools:ignore="GoogleAppIndexingWarning"
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=".Activities.HomeActivity" />
<activity android:name=".Activities.RegisterActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Build.gradle:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-core:17.2.0'
implementation 'com.google.firebase:firebase-auth:19.0.0'
implementation 'com.google.firebase:firebase-storage:19.0.1'
implementation 'com.google.firebase:firebase-database:19.1.0'
implementation 'com.google.android.material:material:1.1.0-alpha10'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
}
I think it is related to Firebase libraries I imported. In my manifest I have nothing related to android:launchMode. Any idea how can I fix this?
Thanks guys!
Related
I'm using AutocompleteSupportFragment in my kotlin android application for getting using place name , longitude and latitude which shows me error sometimes "No search found" but sometimes it works perfectly. When I read on google documentation it asks me to attach payment account and update the gradle etc.
I have attached payment account with this api but now it again shows me sometimes error that "no search found ".
Now i try to update my project libraries and code. When im using this library which is given below :
implementation 'com.google.android.libraries.places:places:1.0.0'
it works perfectly but when i updated my gradle with updated library i.e:
implementation 'com.google.android.libraries.places:places:2.2.0'
Compiler shows me error to add
tools:replace="android:appComponentFactory"
but then again it shows me error
Merging Errors: Error: tools:replace specified at line:14 for attribute android:appComponentFactory, but no new value specified app main manifest (this file), line 13 Error: Validation failed, exiting app main manifest (this file)
Now i can share my files with you
This is my manifestMerger
<?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.sprintsolutions.petsbuyandsell">
<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"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<application
tools:replace="android:appComponentFactory"
android:allowBackup="false"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:roundIcon="#mipmap/icon"
android:usesCleartextTraffic="true"
android:supportsRtl="true"
android:largeHeap="true"
android:hardwareAccelerated="false"
android:theme="#style/AppTheme">
<uses-library
android:name="org.apache.http.legacy"
android:required="false"
/>
<activity android:name="com.sprintsolutions.petsbuyandsell.ContactUsActivity"
android:screenOrientation="portrait"/>
<activity
android:name="com.sprintsolutions.petsbuyandsell.AboutUsActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name="com.sprintsolutions.petsbuyandsell.FullImageActivity"
android:screenOrientation="portrait"/>
<activity
android:name="com.sprintsolutions.petsbuyandsell.ForgetPasswordActivity"
android:screenOrientation="portrait"/>
<activity
android:name="com.sprintsolutions.petsbuyandsell.SplashActivity"
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.sprintsolutions.petsbuyandsell.SignUpActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name="com.sprintsolutions.petsbuyandsell.MainActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden"/>
<activity
android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
android:theme="#style/Base.Theme.AppCompat"/>
<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>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyCLXlTj6IiZjtqjxIsemt7ZrmUJDDUww_I"/>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id"/>
<activity
android:name="com.sprintsolutions.petsbuyandsell.MapsActivity"
android:label="#string/title_activity_maps"
android:screenOrientation="portrait"/>
<activity
android:name="com.sprintsolutions.petsbuyandsell.LoginActivity"
android:screenOrientation="portrait"/>
</application>
</manifest>
Now i can share gradle files
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
signingConfigs {
release {
storeFile file('/Users/HP/AndroidStudioProjects/PetMarket/upload')
storePassword 'a#b12345678'
keyAlias = 'upload'
keyPassword 'a#b12345678'
}
}
compileSdkVersion 28
defaultConfig {
applicationId "com.sprintsolutions.petsbuyandsell"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.release
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
androidExtensions {
experimental = true
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.0.0'
implementation 'com.google.android.libraries.places:places:2.2.0'
implementation 'com.karumi:dexter:5.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.nabinbhandari.android:permissions:3.8'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
api 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:3.0.3'
implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
implementation 'com.google.android.gms:play-services-auth:16.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.twitter.sdk.android:twitter:3.3.0'
}
You should migrate to androidx to make it work
I am trying to fix and build an Android app that is pretty old. Was making some headway but can't get past this point. I have googled like crazy and cannot figure it out.
Finally broke down and posted here. Any help would be greatly appreciated.
I am getting Manifest merger failed with multiple errors when i build
Thank you so much for any advice!!!!
Here is my app.gradle:
apply plugin: 'com.android.application'
repositories {
jcenter()
maven { url 'https://dl.bintray.com/drummer-aidan/maven' }
}
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.inspironlogistics.wensalerts"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
}
useLibrary 'org.apache.http.legacy'
}
dependencies {
implementation 'com.google.firebase:firebase-core:17.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//compile group: 'cz.msebera.android', name: 'httpclient', version: '4.4.1.1'
//compile group: 'org.apache.httpcomponents', name: 'httpclient-android', version: '4.3.5.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:28.0.0'
compile 'com.android.support:design:24.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-gcm:10.2.0'
testCompile 'junit:junit:4.12'
//compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5'
//compile (group: 'org.apache.httpcomponents' , name: 'httpmime' , version: '4.3.5') {
// exclude module: 'org.apache.httpcomponents:httpclient'
//}
//compile files('libs/httpcore-4.3.3.jar')
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.afollestad:easyvideoplayer:0.3.0'
compile('org.apache.httpcomponents:httpmime:4.3.6') {
exclude module: 'httpclient'
}
compile 'org.apache.httpcomponents:httpclient-android:4.3.5'
}
apply plugin: 'com.google.gms.google-services'
AND Here is my manifest.xml:
<?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.inspironlogistics.wensalerts.wensalerts">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<permission
android:name="com.inspironlogistics.wensalerts.wensalerts.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.inspironlogistics.wensalerts.wensalerts.permission.C2D_MESSAGE" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".Activities$CreateAccountActivity"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity android:name=".Activities$SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activities$VerificationActivity"
android:label="#string/title_activity_verification"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".Activities$RegisterActivity"
android:label="#string/title_activity_register"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name=".Activities$UserAccountActivity"
android:label="#string/title_activity_user_account"
android:theme="#style/AppTheme.NoActionBar"
android:windowSoftInputMode="stateAlwaysHidden" />
<!-- GCM Receiver -->
<receiver
android:name="com.google.android.gms.gcm.GcmReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.inspironlogistics.wensalerts.wensalerts" />
</intent-filter>
</receiver>
<!-- GCM Receiver Service -->
<service
android:name=".Utilities.GCMPushReceiverService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<!-- GCM Registration Intent Service -->
<service
android:name=".Utilities.GCMRegistrationIntentService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<activity
android:name=".Activities$MessagesActivity"
android:label="#string/title_activity_messages"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities$ImageListingActivity"
android:label="#string/title_activity_image_listing"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities$VideoListingActivity"
android:label="#string/title_activity_video_listing"
android:theme="#style/AppTheme.NoActionBar" />
<activity
android:name=".Activities$VideoPlayerActivity"
android:label="#string/title_activity_video_player"
android:theme="#style/AppTheme.NoActionBar"></activity>
</application>
</manifest>
AndroidX is incompatible with support libraries so when you use the support libraries, make sure you don't import any other dependency which uses AndroidX. Doing that will always result in manifestMerger errors. It is advisable to move to the AndroidX namespace so that your app can have access to modern versions of plugins and dependencies. You can migrate automatically by Choosing Migrate to AndroidX from the Refactor menu.
Refactor -> Migrate to AndroidX on Android Studio 3.x
I am having a project in android studio in which I have only 1 package and while generating signed apk or debugging the app it installs 2 apk files, both are opening the same apk. I am not sure where the problem is. Can I get some suggestions?
<?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.example.myapplication">
<uses-permission
android:name="android.permission.INSTALL_LOCATION_PROVIDER"
tools:ignore="ProtectedPermissions" />
<application
android:name="androidx.multidex.MultiDexApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:hardwareAccelerated="true"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:testOnly="false"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning,HardcodedDebugMode"
tools:targetApi="m">
<activity android:name="com.example.myapplication.Activity.ImageViewer" />
<activity
android:name="com.example.myapplication.Fragments.LeadManagement.ProcessingLeadUpdate"
android:theme="#style/AppTheme.NoActionBar" >
</activity>
<activity
android:name="com.example.myapplication.Activity.Splash"
android:configChanges="orientation|screenSize|keyboardHidden"
android:noHistory="false"
android:theme="#style/AppTheme.NoActionBar"
android:usesCleartextTraffic="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.myapplication.Activity.MainActivity"
android:configChanges="orientation|screenSize|keyboardHidden"
android:label="#string/app_name"
android:noHistory="false"
android:theme="#style/AppTheme.NoActionBar"
android:usesCleartextTraffic="true"
android:windowSoftInputMode="adjustResize" />
<activity
android:name="com.schibstedspain.leku.LocationPickerActivity"
android:label="#string/leku_title_activity_location_picker"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"
android:windowSoftInputMode="adjustPan">
<meta-data
android:name="android.app.searchable"
android:resource="#xml/leku_searchable" />
</activity>
</application>
I think the problem is in the manifest file, so I am posting the manifest file here.
the build.gradle file in app level
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
configurations {
all {
exclude module: 'httpclient'
exclude module: 'json'
exclude group: 'org.apache.httpcomponents'
}
}
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 17
targetSdkVersion 28
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android-
optimize.txt'), 'proguard-rules.pro'
debuggable false
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta1'
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
implementation 'com.google.android.material:material:1.1.0-alpha06'
implementation 'com.fasterxml.jackson.core:jackson-core:2.9.8'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.9.8'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.9.8'
implementation 'com.squareup.okhttp3:okhttp:3.14.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
implementation 'com.goebl:david-webb:1.3.0'
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.airbnb.android:lottie:3.0.0'
implementation 'com.github.aliumujib:Nibo:2.0'
implementation 'com.google.guava:guava:27.1-android'
implementation 'androidx.fragment:fragment:1.0.0'
implementation('com.schibstedspain.android:leku:6.1.1') {
exclude group: 'com.google.android.gms'
exclude group: 'androidx.appcompat'
}
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.1.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.maps.android:android-maps-utils:0.5'
implementation 'com.github.prabhat1707:EasyWayLocation:1.0'
implementation 'com.ryanjeffreybrooks:indefinitepagerindicator:1.0.10'
implementation 'androidx.viewpager:viewpager:1.0.0'
implementation 'com.github.sharish:ShimmerRecyclerView:v1.3'
implementation 'com.facebook.shimmer:shimmer:0.4.0'
implementation 'com.github.developer-shivam:Crescento:1.2.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
implementation 'com.camerakit:camerakit:1.0.0-beta3.11'
implementation 'com.camerakit:jpegkit:0.1.0'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.31'
implementation 'com.github.PauloLinhares09:RetroPicker:1.2.3-Beta1'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.0.0'
implementation 'com.jsibbold:zoomage:1.2.0'
implementation 'id.zelory:compressor:2.1.0'
compile 'com.github.hkk595:Resizer:v1.5'
}
It feels like your application is picking up activity from some library.
Open the AndroidManifest file. click on Merged Manifest tab (in the bottom of the IDE).
Search for Activity having LAUNCHER intent-filter.
If there is any LAUNCHER Activity other than yours, that is the culprit.
You can modify or update your library AndroidManifest file and remove the activity from the launcher. If that library is not your own and you can't update the AndroidManifest file, you should try some other library.
Here it go, now create your signed build or debug, you will have only one launcher icon.
If you are using customized SplashScreen, check into the AndroidManifest.xml file located on android\app\src\main\AndroidManifest.xml and look for the intent-filter tag like this:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Certifies that you have only one statement of the preview snippet of code, preferably in the .SplashActivity statement, like this:
<activity
android:name=".SplashActivity"
android:theme="#style/SplashScreenTheme"
android:label="#string/app_name"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
and your .MainActivity don't need to have intent-filter inside and will be like:
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- ! DON'T ENNABLE the intent-filter tag here in the same time with .SplashActivity
to avoid duplicated app installation -->
<!-- <intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter> -->
</activity>
I tried adding some new activities to my project, but had to delete them for some reasons. And then my project started giving Manifest merger failed
error. I did not update any thing as such.
I get the following error :
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.4.0) from [com.android.support:design:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
Below is my AndroidManifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.quickstart">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="Google Sheets API Android Quickstart"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="GBL"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
android:screenOrientation="landscape">
</activity>
<service android:name=".NotificationService" />
<receiver
android:name=".MyAlarmReceiver"
android:process=":remote" />
</application>
</manifest>
And this is my app build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.quickstart"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:25.4.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.google.android.gms:play-services-auth:12.0.1'
compile 'pub.devrel:easypermissions:0.3.0'
compile('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-sheets:v4-rev523-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
implementation files('libs/commons-net-3.6.jar')
testImplementation 'junit:junit:4.12'
}
I know this question has been asked tons of times but none of the answers seemed to help me a lot. Any help appreciated Thank you.
Set this manifest file :
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<application
android:allowBackup="fase"
android:icon="#mipmap/ic_launcher"
android:label="Google Sheets API Android Quickstart"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:label="GBL"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name=".NotificationService" />
<receiver
android:name=".MyAlarmReceiver"
android:process=":remote" />
</application>
Your dependencies must all use the same version of the support library.
Try changing the following line compile 'com.android.support:appcompat-v7:25.4.0'
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:design:25.4.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.google.android.gms:play-services-auth:12.0.1'
compile 'pub.devrel:easypermissions:0.3.0'
compile('com.google.api-client:google-api-client-android:1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
compile('com.google.apis:google-api-services-sheets:v4-rev523-1.23.0') {
exclude group: 'org.apache.httpcomponents'
}
implementation 'com.github.PhilJay:MPAndroidChart:v2.2.4'
implementation files('libs/commons-net-3.6.jar')
testImplementation 'junit:junit:4.12'
}
Also, this is why you should use source control (git). When you run into an issue, you can just reset your repository to the last known working state.
You could do what your error says. Add 'tools:replace="android:value" to your manifest like so:
<application
...
android:theme="#style/AppTheme">
<meta-data
tools:replace="android:value">
...
</application>
I published an Android app on the google play store but it says that it is incompatible with ALL devices:
Unsupported devices:15023
Below is the listings from Google play developer console
menifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="masco.mis.software.mascoapproval">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-feature android:name="android.hardware.Camera" android:required="true"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<application
android:name=".Tapplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher_masco"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyC7UKI8yiVrzUllwLS3V2_b-H5Mor54KGc"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="#drawable/ic_message"/>
<meta-data android:name="com.google.firebase.messaging.default_notification_color"
android:resource="#color/colorPrimary"/>
<activity android:name=".MapActivity">
android:parentActivityName=".HomeActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".HomeActivity"/>
</activity>
<activity
android:name=".LoginActivity"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".HomeActivity"
android:screenOrientation="portrait">
</activity>
<activity android:name=".chatoperation.NewChatOperationActivity">
</activity>
<activity android:name=".IntroActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".chat.ChatOperationActivity"/>
<receiver
android:name=".TReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<service
android:name=".service.LocationTService"
android:exported="false"/>
<service
android:name=".service.CountTService"
android:enabled="true"
android:exported="true"/>
<service
android:name=".service.FCMService"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
<service android:name=".fcm.FcmToken">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
</intent-filter>
</service>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
</application>
</manifest>
my gradle dependency looks below:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "masco.mis.software.mascoapproval"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.google.android.gms:play-services-places:10.2.0'
compile 'com.google.android.gms:play-services-analytics:10.2.0'
compile 'ch.acra:acra:4.9.1'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.android.support:design:25.2.0'
compile 'me.leolin:ShortcutBadger:1.1.11'
compile 'com.github.markomilos:paginate:0.5.1'
compile 'com.github.castorflex.smoothprogressbar:library-circular:1.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'jp.wasabeef:recyclerview-animators:1.2.2'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.google.firebase:firebase-core:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
But this app runs without any problem when I test it with physical device and also on emulator(api 19,22,25) on android studio.
You have indicated the camera feature in your manifest file:
<uses-feature android:name="android.hardware.Camera" android:required="true" />
but it must be all lowercase:
<uses-feature android:name="android.hardware.camera" android:required="true" />
No device has android.hardware.Camera which is why you are compatible with zero devices.