zoho / salesiq-mobilisten-flutter

SalesIQ Mobilisten plugin for Flutter.
https://mobilisten.io
MIT License
12 stars 10 forks source link

Bad Request in Library #11

Closed thangeco closed 2 years ago

thangeco commented 2 years ago

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

FAILURE: Build failed with an exception.

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! `

thangeco commented 2 years ago

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.

BUILD FAILED in 2s Exception: Gradle task assembleDebug failed with exit code 1

Please help me check this.

Angu-G commented 2 years ago

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

thangeco commented 2 years ago

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.

thangeco commented 2 years ago

Upgrade my project to newest flutter and dependencies are working.