android - 当我尝试使用 android-image-cropper :2. 8.+ 时我被卡住了

标签 android dependencies android-studio-3.0

当我添加到此行 implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'在我的依赖中
它会导致错误

* 我的错误 *

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] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:8:5-25:19 to override.


implementation 'com.android.support:appcompat-v7: 28.0.0'

这条线变成红线

我认为问题是版本的原因

我怎样才能避免这种冲突?

我已经尝试更改版本并在 list 中添加代码
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<usespermissionandroid:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

但它没有用

这是我的 list
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.blogapp">

    <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">
        <activity android:name=".Activities.LoginActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".Activities.RegisterActivity" />
        <activity android:name=".Activities.PostActivity" />
        <activity android:name=".Activities.HomeActivity" />
    </application>

</manifest>

这是我的依赖
apply plugin: 'com.android.application'

    android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.blogapp"
        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(dir: 'libs', include: ['*.jar'])

    implementation 'com.android.support:appcompat-v7:28.0.0'

    implementation 'com.android.support.constraint:constraint-layout:1.1.3'

    implementation 'com.google.firebase:firebase-core:16.0.1'

    implementation 'com.google.firebase:firebase-auth:16.0.1'

    implementation 'com.google.firebase:firebase-storage:16.0.1'

    implementation 'com.google.firebase:firebase-database:16.0.1'

    implementation "com.wdullaer:materialdatetimepicker:3.6.4"

    implementation 'com.android.support:support-v4:28.0.0'

    implementation 'com.android.support:recyclerview-v7:28.0.0'

    implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.+'

    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 'de.hdodenhof:circleimageview:3.0.0'

    implementation 'com.github.siyamed:android-shape-imageview:0.9.3@aar'

    implementation 'com.github.bumptech.glide:glide:4.9.0'
}

apply plugin: 'com.google.gms.google-services'

我希望在我的依赖中使用这个 imageCropper 没有问题
https://github.com/ArthurHub/Android-Image-Cropper

最佳答案

图书馆搬到了一个新的(旧的没有维护)
https://github.com/CanHub/Android-Image-Cropper
阅读 here

关于android - 当我尝试使用 android-image-cropper :2. 8.+ 时我被卡住了,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55349641/

相关文章:

android - 可以选择要求 Google Maps API 支持吗?

java - Maven 无法解决依赖关系

android - 无法构建 Android APK - 任务 ':app:mergeDebugResources' 执行失败

java - 在两个类之间传递数据

android - 如何使用 Google Maps API v2 确定经纬度坐标是否在道路上

android - 如何在 OS X 上使用 Genymotion 拖放支持?

android - 当设备收到 FCM 高优先级消息时,设备会保持唤醒状态多长时间?

dependencies - bundle 安装包括所有依赖项,即使使用 --without

c++ - 运行时的库依赖

HAXM 的 Android Studio 问题