skip to Main Content

I’m creating an Flutter application.

Now I want to add Flutter OSM to project for working with maps. But after adding flutter_osm_plugin to pubspec.yaml I’m getting an error:

[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':flutter_osm_plugin'.
> Could not resolve all artifacts for configuration ':flutter_osm_plugin:classpath'.
   > Could not download kotlin-compiler-embeddable-1.5.21.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.5.21)
      > Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.5.21/kotlin-compiler-embeddable-1.5.21.jar'.
         > Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.5.21/kotlin-compiler-embeddable-1.5.21.jar'.
            > Connect to fodev.org:8118 [fodev.org/45.129.39.130] failed: Connection refused: connect
> Failed to notify project evaluation listener.
   > Could not find method implementation() for arguments [project ':flutter_plugin_android_lifecycle'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
   > Could not find method implementation() for arguments [project ':location'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* 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 19s
Running Gradle task 'assembleDebug'...                             23,6s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1

kotlin-compiler-embeddable-1.5.21.jar downloading from browser. But I can’t install this from Android Studio. I haven’t an Antivirus.

What’s problem? Thanks a lot.

2

Answers


  1. Chosen as BEST ANSWER

    Thanks a lot. I'v resolved the problem.

    I changed a kotlin compiler version and choosed 'No Proxy' in HTTP Settings.


  2. It sounds like you’re probably building your Flutter app using Android Studio (vs. VSCode, or the Flutter CLI). Please try the suggestions in this thread: Could not download kotlin-compiler-embeddable.jar

    • Ensure you’re not in offline mode:

      • Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences).

      • In the left pane, click Build, Execution, Deployment > Gradle. Check the Offline work checkbox off.

      • Click Apply or OK.

    • Update the library version:

      • Click Dependencies >
        Find and Click org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21 (or whatever your current version is)
      • Under Details > update section, click [update variable] > [update dependencies]

    Please confirm your build environment (A/S?); please let us know if you resolved the problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search