I have an gradle error everytime I run the app - android

I am working with an android project and every time I run the app there is an error of this type :
Manifest merger failed : Attribute application#appComponentFactory
value=(android.support.v4.app.CoreComponentFactory) from
[com.android.support:support-compat:28.0.0]
AndroidManifest.xml:22:18-91 is also present at
[androidx.core:core:1.0.0-alpha1] AndroidManifest.xml:22:18-86
value=(androidx.core.app.CoreComponentFactory). Suggestion: add
'tools:replace="android:appComponentFactory"' to element
at AndroidManifest.xml:10:5-44:19 to override.
And even if I try to do it the way it told me there is another error.
This is the build.gradle file :
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.community.jboss.visitingcard"
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'
}
}
buildToolsVersion '28.0.3'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
//the intro library
implementation 'com.github.msayan:tutorial-view:v1.0.6'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation "com.android.support:preference-v7:28.0.0"
implementation 'androidx.appcompat:appcompat:1.0.0-alpha1'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
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'
}
And this is the Manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.community.jboss.visitingcard">
<!--
TODO: Add location/GPS access permissions
TODO: Change the Label of the Activities according to the Activity's
context
TODO: Change App Icon .i.e., ic_launcher
-->
<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=".LoginActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar" />
<activity android:name=".VisitingCard.VisitingCardActivity" />
<activity android:name=".IntroScreens.SliderActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- TODO: Add Google Maps API key here -->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".Maps.MapsActivity"
android:label="#string/title_activity_maps"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" />
<activity android:name=".VisitingCard.ViewVisitingCard" />
<activity
android:name=".SettingsActivity"
android:label="#string/title_activity_settings" />
<activity android:name=".IntroActivity"></activity>
</application>
</manifest>

Add the following line in your manifest :
tools:replace="android:appComponentFactory"
Like this :
<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"
tools:replace="android:appComponentFactory>
//Your code here
</application>

You are using two appcompat dependencies one from support namespace and another one is from androidx namespace.Ideally solution would be move your project completely to androidx and remove the below mentioned dependency,
implementation 'com.android.support:appcompat-v7:28.0.0'
and you could use stable version of andoid x appcompat library
androidx.appcompat:appcompat:1.0.0 instead of androidx.appcompat:appcompat:1.0.0-alpha1'

It seems you decided to use androidX in your project, but using appCompat with androidX together is incorrect.
It's better if you use androidX's libraries, remove appCompat ones.
If you insistent to use androidX remove implementation 'com.android.support:appcompat-v7:28.0.0' in build.gradle file or remove androidX one, otherwise.
for more information about your error :
You can open the "Manifest" file and go to merged tab. At the bottom of file you can see what are wrong.

Related

My manifest went missing after failing building gradle with Glide Library

I tried using the Glide library in order to load a profile picture from Facebook, in the gradle I implemented the 4.8.0 version (which is not the latest) and it made this error :
ERROR: Failed to parse XML in C:\Users\Paul Jouet\Desktop\ESILV\S5\Mobile Programming\ProjetTest2\app\src\main\AndroidManifest.xml
ParseError at [row,col]:[18,89]
Message: expected start or end tag
Affected Modules: app
My manifest module has disappeared, it is still in my project and I can open it, but not from the 'android' section... When I tried syncing again without the implementation, the error remains, I tried some solutions I found like cleaning the project and rebuild it, but none worked.
This is how the 'android' section looks like after the failed syncing, the module 'manifest' is missing even though it is still in the same location as before
Can someone explain to me how this can happen ? It makes no sense to me since I obviously deleted the part causing the problem... The only solution I could find is to recreate a project from scratch and copy paste all my code, but this is not viable since it can happen again.
Thank you for helping !
Edit : here are my manifest and gradle codes
Gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.projettest2"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.facebook.android:facebook-android-sdk:4.42.0'
implementation 'de.hdodenhof:circleimageview:3.0.1'
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
}
}
Manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.projettest2">
<uses-permission android:name="android.permission.INTERNET"/>
<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>
<provider
android:authorities="com.facebook.app.FacebookContentProvider464643414180175" //I changed the ID
android:name="com.facebook.FacebookContentProvider"
android:exported="false" />
<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>
</application>
</manifest>

manifest merger failed-appcomponentfactory [duplicate]

i am new in android and have an app that when build my project have this Error ::
ERROR: Manifest merger failed : Attribute
application#appComponentFactory
value=(androidx.core.app.CoreComponentFactory) from
[androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 is also
present at [com.android.support:support-compat:28.0.0]
AndroidManifest.xml:22:18-91
value=(android.support.v4.app.CoreComponentFactory). Suggestion: add
'tools:replace="android:appComponentFactory"' to element
at AndroidManifest.xml:9:5-44:19 to override.
My Gradle build is ::
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "maa.tic_tac_to"
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'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.firebase:firebase-messaging:19.0.1'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// implementation 'com.android.support:appcompat-v7:24.2.1'
implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation 'com.android.support:support-v4:28.+'
// implementation ('com.theartofdev.edmodo:android-image-cropper:2.4.+'){
// exclude group: 'com.android.support'
//}
// implementation 'com.google.android.material:material:1.0.0-alpha08'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
// implementation 'com.androidx.constraintlayout.widget:ConstraintLayout:2.0.0-beta2'
testImplementation 'junit:junit:4.12'
}
and manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="maa.tic_tac_to">
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<application
android:allowBackup="true"
android:icon="#drawable/tic_tac_toe"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"></activity>
<receiver
android:name=".MySMSReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<activity android:name=".FakeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LogInActivity"></activity>
<service
android:name=".MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
i test every solution in stackoverflow and google search but anyone help me.
can anyone help to solve this error ?!?!?!?
You are using
implementation 'com.google.firebase:firebase-messaging:19.0.1'
Firebase migrated to AndroidX in the latest release.
It means that you are using both, support libraries and androidx libraries.
You can:
migrate to androidx as described below
downgrade your firebase dependencies (but it is not a real solution because you have to migrate sooner or later)
You can check the official release notes:
Warning: This release is a MAJOR version update and breaking change.
The latest update to Google Play services and Firebase includes the following changes:
Migration from Android Support Libraries to Jetpack (AndroidX) Libraries. Libraries will not work unless you make the following changes in your app:
Upgrade com.android.tools.build:gradle to v3.2.1 or later.
Upgrade compileSdkVersion to 28 or later.
Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.

Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) [duplicate]

i am new in android and have an app that when build my project have this Error ::
ERROR: Manifest merger failed : Attribute
application#appComponentFactory
value=(androidx.core.app.CoreComponentFactory) from
[androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 is also
present at [com.android.support:support-compat:28.0.0]
AndroidManifest.xml:22:18-91
value=(android.support.v4.app.CoreComponentFactory). Suggestion: add
'tools:replace="android:appComponentFactory"' to element
at AndroidManifest.xml:9:5-44:19 to override.
My Gradle build is ::
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "maa.tic_tac_to"
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'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.firebase:firebase-messaging:19.0.1'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// implementation 'com.android.support:appcompat-v7:24.2.1'
implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation 'com.android.support:support-v4:28.+'
// implementation ('com.theartofdev.edmodo:android-image-cropper:2.4.+'){
// exclude group: 'com.android.support'
//}
// implementation 'com.google.android.material:material:1.0.0-alpha08'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
// implementation 'com.androidx.constraintlayout.widget:ConstraintLayout:2.0.0-beta2'
testImplementation 'junit:junit:4.12'
}
and manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="maa.tic_tac_to">
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<application
android:allowBackup="true"
android:icon="#drawable/tic_tac_toe"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity"></activity>
<receiver
android:name=".MySMSReceiver"
android:enabled="true"
android:exported="true">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<activity android:name=".FakeActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LogInActivity"></activity>
<service
android:name=".MyFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>
</application>
</manifest>
i test every solution in stackoverflow and google search but anyone help me.
can anyone help to solve this error ?!?!?!?
You are using
implementation 'com.google.firebase:firebase-messaging:19.0.1'
Firebase migrated to AndroidX in the latest release.
It means that you are using both, support libraries and androidx libraries.
You can:
migrate to androidx as described below
downgrade your firebase dependencies (but it is not a real solution because you have to migrate sooner or later)
You can check the official release notes:
Warning: This release is a MAJOR version update and breaking change.
The latest update to Google Play services and Firebase includes the following changes:
Migration from Android Support Libraries to Jetpack (AndroidX) Libraries. Libraries will not work unless you make the following changes in your app:
Upgrade com.android.tools.build:gradle to v3.2.1 or later.
Upgrade compileSdkVersion to 28 or later.
Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.

Manifest merger failed when adding CameraX gradle dependency

I'm trying to use the CameraX library in a brand new Android Studio project based off the official CameraX demo app:
I've added the following dependencies to my (module) build.gradle:
implementation "androidx.camera:camera-core:1.0.0-alpha01"
implementation "androidx.camera:camera-camera2:1.0.0-alpha01"
and my AndroidManifest.xml looks like:
<?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="simplediary.raouf.camerapoc">
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<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>
Trying to run the project I get the following error
Manifest merger failed : Attribute application#appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.1.0-beta01] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:9:3-23:17 to override.
Adding "tools:replace="android:appComponentFactory" to the application element in the manifest now results in this error:
Manifest merger failed with multiple errors, see logs
So under 'Merged Manifest' in AndroidManifest.xml these are the errors I'm now seeing:
Error: tools:replace specified at line:9 for attribute android:appComponentFactory, but no new value specified app main manifest (this file), line 8 Error: Validation failed, exiting app main manifest (this file)
How can I get around this issue? Full build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "simplediary.raouf.camerapoc"
minSdkVersion 21
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'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "androidx.camera:camera-core:1.0.0-alpha01"
implementation "androidx.camera:camera-camera2:1.0.0-alpha01"
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'
}
Appreciate any help!
You'll have to Migrate to AndroidX library:
here's the steps:
1/ go under "refactor"
2/in the drop down menu select "Migrate to AndroidX"
3/make sure to keep a Backup (by version control or check the keep backup checkbox)
4/follow the setup wizard
5/when finished clean project & rebuild

Image Cropper is not working properly - why?

I am trying to build a what's app application but when I try to implement android image cropper in build.gradle it gave me some error like this
"ERROR: Failed to parse XML in
H:\Project\WhatsApp2\app\src\main\AndroidManifest.xml ParseError at
[row,col]:[17,9] Message: expected start or end tag Affected Modules:
app "
My code is given below
Android Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.whatsapp2">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<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">
tools:replace="android:appComponentFactory"
<activity android:name=".PhoneLoginActivity"></activity>
<activity android:name=".GroupChatActivity" />
<activity android:name=".SettingsActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LoginActivity" />
<activity android:name=".RegisterActivity" />
</application>
</manifest>
build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.whatsapp2"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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.google.firebase:firebase-auth:16.0.3'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.firebase:firebase-storage:16.0.1'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
}
What should I do now?
For those, who still get an error even after adding dependency:
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
If your error may be something like:
Classes of CropImage Library were not auto suggested by IDE, then you must ensure this maven { url 'https://jitpack.io' } and jcenter() in your project level build.gradle file.
Like this:
buildscript {
repositories {
mavenCentral()
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.google.gms:google-services:4.3.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
It must work in that scenario. Hope! it helps.
For Temporary solution you can downgrade version as below:
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
instead of
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
Note : This error is regarding android jetpacks that may be updated in library.
First convert your project into androidx by refactoring
Refactor-> Migrate to AndroidX -> Migrate
or add below lines in gradle.properties and manually change all widgets into androidx
android.useAndroidX=true
android.enableJetifier=true
And change this
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
into
api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
You were missing a ">" closing tag, do it like :
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<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"
tools:replace="android:appComponentFactory">
<activity android:name=".PhoneLoginActivity"/>
<activity android:name=".GroupChatActivity" />
<activity android:name=".SettingsActivity" />
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".LoginActivity" />
<activity android:name=".RegisterActivity" />
</application>
Update : As you see there is an error in you AndroidManifest.xml file stating :
expected start or end tag Affected Modules: app
If you using below version of library
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
Then please add this line to your Proguard config file(proguard-rules.pro) and check it once
-keep class androidx.appcompat.widget.** { *; }
and also remove tools:replace="android:appComponentFactory" from manifest file
which is outside of <application> tag
Recently this problem become very common when using android support library and third party libraries. Try migrating to androidX, it's pretty safe. And add:
android.useAndroidX=true
android.enableJetifier=true
in your gradle.properties which will automatically done if you migrate to androidX with android studio 3.2 plugin, to do this, go to refactor menu and choose migrate to androidX.

Categories

Resources