图书馆 - 如何?

libraries - how to?

大家好,抱歉,我还是 android studio 和 java 的新手,所以我的代码有问题,您可以在这些屏幕截图中看到,我写了这些行来修复错误:

implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'

是的,错误已解决,但当我尝试使用发布模式生成签名的 apk 时,它告诉我这是不可能的,但在解决问题之前,我可以轻松生成 apk screenshot 1

screenshot 2

如果你知道如何解决这个问题,请帮助我。

看来你得更新了

com.facebook.fresco....

com.google.android....

依赖项。这些依赖项的旧版本可能具有旧版本的支持库。这可能会导致冲突,因此将这些依赖项更新到最新版本可以解决此错误。

首先更新所有黄色行(将鼠标悬停在它们上面并接受推荐的版本号)。这些都是过时的依赖项。然后将鼠标悬停在显示错误的行上并继续添加它推荐的具体实现(其中显示 "Examples include...")。您已经在正确的轨道上添加了那些,但如果您不先更新黄线,这将花费您一整天的时间。

将这两行添加到您的 build.gradle 文件中

dependencies {

   implementation com.android.support:support-vector-drawable:28.0.0
   implementation com.android.support:customtabs:28.0.0

}

某些第三方库有时可能会使用不同版本的支持库,您可以像这样指定固定版本来修复

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '28.0.0'
            }
        }
    }
}

您必须更新给定的库才能这样做,例如:

First, you can do it by pointing the mouse (hover) in the given libraries with the yellow mark, and then by pressing ALT + ENTER.

Secondly by going through the documentation and checking one by one click here.

Ps :同步您的 gradle 后,一切就绪。