csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
387 stars 235 forks source link

A problem occurred configuring project ':speech_to_text'. #556

Closed markHamilton34 closed 1 month ago

markHamilton34 commented 1 month ago

Hello,

When adding the speech_to_text package, I get this error when running my app. I've already tried several possible solutions I found online, but none of them have helped. This error only happens if I add this package. If I don't add it, my app runs correctly.

This is the error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':speech_to_text'.
> Could not resolve all files for configuration ':speech_to_text:classpath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
     Required by:
         project :speech_to_text
      > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10.
         > Could not get resource 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.
            > Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.10/kotlin-gradle-plugin-1.7.10.pom'.

android/app/build.gradle has:

dependencies {
    implementation 'com.android.support:multidex:2.0.1'  
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

android/gradle/wrapper/gradle-wrapper.properties has: distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip

android/build.gradle has:

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

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

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

What could be causing the error? Thanks for your support!

sowens-csd commented 1 month ago

What version of the plugin are you using? Does the example app build properly on your system? I'm surprised no one else has reported this.

markHamilton34 commented 1 month ago

I was able to solve it. It was an issue with my local network that prevented me from installing new packages, so it wasn't a problem with the package itself. Everything is working fine now! Thanks again for your response.