я реализовал 'com.stripe:stripe-android:8.5.0'
в своем приложении, а затем я получил следующую ошибку при попытке построить мой проект:
Ошибка слияния манифеста: Атрибут application @ appComponentFactory value = (android.support.v4.app.CoreComponentFactory) из [com.android.support:support-compat:28.0.0] AndroidManifest.xml: 22: 18-91
также присутствует в [androidx.core: core: 1.0.1] AndroidManifest.xml: 22: 18-86 value = (androidx.core.app.CoreComponentFactory).
Предложение: добавьте 'tools: replace = "android: appComponentFactory"' к элементу на AndroidManifest.xml: 14: 5-68: 19, чтобы переопределить.
Gradle моего приложения:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.khoi.myApp"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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:animated-vector-drawable:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:support-vector-drawable:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-places:16.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.1.0'
implementation 'com.google.firebase:firebase-database:16.0.5'
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.ncapdevi:frag-nav:3.0.0'
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation "android.arch.lifecycle:viewmodel:1.1.1"
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.20"
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.crystal:crystalrangeseekbar:1.1.3'
implementation 'com.stripe:stripe-android:8.5.0'
}
apply plugin: 'com.google.gms.google-services'
Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.khoi.myApp">
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<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=".activities.RentActivity"
android:label="Rent">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity"/>
</activity>
<uses-library
android:name="org.apache.http.legacy"
android:required="false" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name=".activities.SplashActivity"
android:theme="@style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.MainActivity"
android:theme="@style/AppTheme"></activity>
<activity
android:name=".activities.LoginActivity"
android:theme="@style/HiddenTitleTheme"></activity>
<activity
android:name=".activities.RegisterActivity"
android:theme="@style/HiddenTitleTheme">
<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>
</application>
</manifest>