zoho/salesiq-mobilisten-flutter

Bad Request in Library

thangeco opened this issue · 4 comments

I've got this error after add salesiq_mobilisten into project.
But more explain this:

  • Clone repo example and run success with example code on 2 platforms ios & android.
  • Add dependency to my project, iOS platform run success, but on Android platform got this exception below:

FAILURE: Build failed with an exception.

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

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not resolve com.google.android.gms:play-services-base:[15.0.1,16.0.0).
Required by:
project :app > project :salesiq_mobilisten > com.zoho.salesiq:mobilisten:4.2.3 > com.google.android.gms:play-services-maps:15.0.1
project :app > project :salesiq_mobilisten > com.zoho.salesiq:mobilisten:4.2.3 > com.google.android.gms:play-services-location:15.0.1
> Failed to list versions for com.google.android.gms:play-services-base.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/google/android/gms/play-services-base/maven-metadata.xml'. 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

My flutter doctor -v

`fvm flutter doctor -v
[✓] Flutter (Channel stable, 2.0.3, on macOS 12.1 21C52 darwin-arm, locale en-VN)
• Flutter version 2.0.3 at /Users/useer/Development/flutter
• Framework revision 4d7946a68d (1 year ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/useer/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 13.2.1, Build version 13C100
• CocoaPods version 1.11.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)

[✓] VS Code (version 1.65.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.36.0

[✓] Connected device (2 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 31) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 99.0.4844.83

• No issues found!
`

At this time, I've create new project sample, then add mobilisten as dependency and got the same error message:

FAILURE: Build failed with an exception.

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

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find com.zoho.salesiq:mobilisten:4.2.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/zoho/salesiq/mobilisten/4.2.3/mobilisten-4.2.3.pom
- https://jcenter.bintray.com/com/zoho/salesiq/mobilisten/4.2.3/mobilisten-4.2.3.pom
- https://storage.googleapis.com/download.flutter.io/com/zoho/salesiq/mobilisten/4.2.3/mobilisten-4.2.3.pom
Required by:
project :app > project :salesiq_mobilisten

  • 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 2s
Exception: Gradle task assembleDebug failed with exit code 1

Please help me check this.

Hello @thangeco, Please add the google() repository in project-level build.gradle.

This is my project build.gradle

buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}

dependencies {
    classpath 'com.android.tools.build:gradle:4.1.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.3.8'
}

}

allprojects {
repositories {
google()
mavenCentral()
maven { url 'https://maven.zohodl.com' }
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
}

Screen Shot 2022-03-29 at 00 27 50

Try clean gradle-wrapper.jar then run Sync Project with Gradle Files but not success.

Upgrade my project to newest flutter and dependencies are working.