zoho / salesiq-mobilisten-flutter

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

Android error : Execution failed for task ':app:checkDebugAarMetadata'. #35

Closed Joezzy closed 1 year ago

Joezzy commented 1 year ago

I'm using salesiq_mobilisten: ^2.0.0

ERROR:


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.zoho.salesiq:mobilisten:4.4.0.
     Required by:
         project :app > project :salesiq_mobilisten
      > Could not resolve com.zoho.salesiq:mobilisten:4.4.0.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/com/zoho/salesiq/mobilisten/4.4.0/mobilisten-4.4.0.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/com/zoho/salesiq/mobilisten/4.4.0/mobilisten-4.4.0.pom'.
               > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
                  > Remote host terminated the handshake

* 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 1m 56s
Retrying Gradle Build: #1, wait time: 100ms
[!] Gradle threw an error while downloading artifacts from the network.
Running Gradle task 'assembleDebug'...
bhahirathan-mb-11956 commented 1 year ago

Hi @Joezzy ,

Thanks for writing to us. Kindly verify that you have added the Zoho's maven url in your project's build.gradle/settings.gradle as mentioned in the 5th point of README.md.

allprojects {
    repositories {
             ....
             maven { url 'https://maven.zohodl.com' }
             ....
    }
}

Please write back to us at support@zohosalesiq.com with the Github issue ID if the issue persists.

Regards,

Bhahirathan M, Zoho SalesIQ.

Joezzy commented 1 year ago

Hi @DavidBhahirathan , Thanks for your response but, I've done all that already, but let me just paste my code here

I'm using

salesiq_mobilisten: ^2.1.0 in pubspec.yaml

PROJECT build.gradle

buildscript {
    ext.kotlin_version = '1.7.10'
    repositories {
        google()
        mavenCentral()
        maven {
            url 'https://maven.zohodl.com'
        }

    }

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

    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

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

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

Code in my main.dart


 import 'package:salesiq_mobilisten/salesiq_mobilisten.dart';

 if (io.Platform.isIOS || io.Platform.isAndroid) {
    String? appKey;
    String? accessKey;
    if (io.Platform.isIOS) {
      appKey = dotenv.env["IOS_APP_KEY"];
      accessKey = dotenv.env["IOS_APP_KEY"];
    } else {
      appKey = dotenv.env["ANDROID_APP_KEY"];
      accessKey = dotenv.env["ANDROID_ACCESS_KEY"];
    }

    print("APP_KEY=$appKey");
    print("ACCESS_KEY=$accessKey");

    ZohoSalesIQ.init(appKey!, accessKey!).then((_) {
      // initialization successful
      ZohoSalesIQ.showLauncher(true);
      // To show the default live chat launcher, you can use the showLauncher API.
      // Alternatively, you may use the 'Avail floating chat button for your app' option under Settings → Brands → Installation → Android/iOS.
    }).catchError((error) {
      // initialization failed
      print("CATCH_ERROR :: $error");
    });
  }

FLUTTER DOCTOR

[✓] Flutter (Channel stable, 3.7.5, on macOS 13.2.1 22D68 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[!] Android Studio (version 2022.1)
    ✗ Unable to find bundled Java version.
[✓] Connected device (3 available)
[✓] HTTP Host Availability

I still get the same error ...what am I missing?

Joezzy commented 1 year ago

Also II noticed the version In your documentation here is still 1.0.4 while on pub.dev it is higher

bhahirathan-mb-11956 commented 1 year ago

@Joezzy Kindly move the Zoho's maven url into allprojects and verify it once.


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

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

    }
}

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

...
bhahirathan-mb-11956 commented 1 year ago

Hi @Joezzy ,

As there is no recent activity from your side, we're closing this issue. You can reopen this again anytime. Meanwhile, please check out latest version.

For further queries, please feel free to write us at support@zohosalesiq.com. We will be happy to assist you.

Joezzy commented 1 year ago

@Joezzy Kindly move the Zoho's maven url into allprojects and verify it once.


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

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

    }
}

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

...

It solved the issue for Android..it works now. I've still not figured out in iOS yet