RxReader / alipay_kit

Flutter版支付宝登录/支付
MIT License
313 stars 56 forks source link

FAILURE: Build failed with an exception. #30

Closed DizzyDuan closed 3 years ago

DizzyDuan commented 3 years ago

Android Studio 4.2.1

classpath 'com.android.tools.build:gradle:4.2.1'

distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip

Flutter SDK 2.2.1

使用命令打包:flutter build apk

FAILURE: Build failed with an exception.

BUILD FAILED in 4s

The plugin alipay_kit could not be built due to the issue above.

    rootProject.allprojects {
        repositories {
            google()
            jcenter()

            // 私仓
            flatDir {
                dirs project(':alipay_kit').file('libs')  // 错误位置
            }
        }
    }
droplet-js commented 3 years ago

日志不全

DizzyDuan commented 3 years ago

FAILURE: Build failed with an exception.

BUILD FAILED in 3m 14s

DizzyDuan commented 3 years ago

把Android Studio更新到最新版

classpath 'com.android.tools.build:gradle:4.2.1'

distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip

使用命令flutter build apk 就会出现问题

droplet-js commented 3 years ago

这就与我无关了,你需要做的事升级 android/app/build.gradle 里的 compileSdkVersion

DizzyDuan commented 3 years ago

我自己的已经是 compileSdkVersion 30

我修改alipay_kit的compileSdkVersion 30也是build失败的

建议作者可以升级测试一下: classpath 'com.android.tools.build:gradle:4.2.1'

其实把 classpath 'com.android.tools.build:gradle:4.2.1' 降到 classpath 'com.android.tools.build:gradle:4.1.2' 就可以正常build了

droplet-js commented 3 years ago

我升级了 com.android.tools.build:gradle:4.2.1 和 https://services.gradle.org/distributions/gradle-6.7.1-bin.zip,一切都正常 ... 而且我翻看了 com.android.tools.build:gradle:4.2.1 里的 flatDir,和 4.1.2 版本木有区别 ...

DizzyDuan commented 3 years ago

Android Studio:

classpath 'com.android.tools.build:gradle:4.2.2'

distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-bin.zip

使用命令打包 flutter build apk flutter build apk --no-shrink

FAILURE: Build failed with an exception.

BUILD FAILED in 5s

The plugin alipay_kit could not be built due to the issue above.

mimiaopp commented 2 years ago

诸位,最后怎么解决的,我也出现了这个问题