ko2ic / image_downloader

Flutter plugin that downloads images and movies on the Internet and saves to Photo Library on iOS or specified directory on Android.
https://pub.dartlang.org/packages/image_downloader#-readme-tab-
MIT License
92 stars 116 forks source link

The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. #28

Closed k3sc closed 5 years ago

k3sc commented 5 years ago

`D8: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver

FAILURE: Build failed with an exception.

BUILD FAILED in 1m 8s Finished with error: Gradle task assembleDebug failed with exit code 1


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.


`

image `def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') def keystorePropertiesFile = rootProject.file("key.properties") def keystoreProperties = new Properties() keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } }

def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") }

def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' }

def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' }

apply plugin: 'com.android.application' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android { compileSdkVersion 28

lintOptions {
    disable 'InvalidPackage'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.yinet.***"
    minSdkVersion 16
    targetSdkVersion 28
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    ndk {
        abiFilters 'x86', 'armeabi-v7a'//, 'x86_64', 'mips', 'mips64', 'arm64-v8a','armeabi'
    }
    manifestPlaceholders = [
            JPUSH_PKGNAME: applicationId,
            JPUSH_APPKEY : "********", // NOTE: JPush 上注册的包名对应的 Appkey.
            JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
    ]
}

signingConfigs {
    release {
        keyAlias 'yinet'
        keyPassword 'zd123456'
        storeFile file('key/zhengding.jks')
        storePassword 'zd123456'
    }
}

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.release
    }
}

}

flutter { source '../..' }

dependencies { 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' } ` image

ko2ic commented 5 years ago

@k3sc This plugin supports androidx. What error did you see and thought that this plug-in was the cause?

ko2ic commented 5 years ago

It is still working properly now. There is no response so close. If you still have problems, please give a different issue.

exeptionerror commented 3 years ago

All Possible working solution added [Solved] Gradle failure may have been because of AndroidX incompatibilities in this Flutter app