'Android build issue with 'scan' plugin - Flutter

Android build failing with following exception.

Plugin: scan [https://pub.dev/packages/scan]

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:mergeDevReleaseAssets'.

Could not resolve all files for configuration ':app:devReleaseRuntimeClasspath'. Could not resolve com.huawei.hms:scanplus:2.1.0.300. Required by: project :app > project :scan > Could not resolve com.huawei.hms:scanplus:2.1.0.300. > Could not get resource 'https://google.bintray.com/exoplayer/com/huawei/hms/scanplus/2.1.0.300/scanplus-2.1.0.300.pom'. > Could not GET 'https://google.bintray.com/exoplayer/com/huawei/hms/scanplus/2.1.0.300/scanplus-2.1.0.300.pom'. Received status code 502 from server: Bad Gateway

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  • Get more help at https://help.gradle.org BUILD FAILED in 2m 59s


Solution 1:[1]

add: maven {url 'http://developer.huawei.com/repo'} check your build.gradle

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Haider Sarfraz