flutter 报错 Could not resolve io.flutter:flutter_embedding_release

 我是升级flutter后,所有项目都报错,先贴解决办法:

flutter\packages\flutter_tools\gradle 目录下

aar_init_script.gradle
resolve_dependencies.gradle
flutter.gradle
以上三个文件中将
http://download.flutter.io
替换为:

https://storage.googleapis.com/download.flutter.io

 

报错如下:

flutter build apk
The plugin `flutter_forbidshot` is built using an older version of the Android plugin API which assumes that it’s
running in a full-Flutter environment. It may have undefined behaviors when Flutter is integrated into an existing app
as a module.
The plugin can be updated to the v2 Android Plugin APIs by following https://flutter.dev/go/android-plugin-migration.
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it’s recommended to use app bundles or split the APK to reduce the APK
size.
To generate an app bundle, run:
flutter build appbundle –target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk –target-platform android-arm,android-arm64,android-x64 –split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
[!] Your app isn’t using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ‘:flutter_tencentplayer:compileReleaseRenderscript’.
> Could not resolve all task dependencies for configuration ‘:flutter_tencentplayer:releaseCompileClasspath’.
> Could not resolve io.flutter:flutter_embedding_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.
Required by:
project :flutter_tencentplayer
> Could not resolve io.flutter:flutter_embedding_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.
> Could not get resource ‘http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutter_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.pom’.
> Could not GET ‘http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutter_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.pom’.
> download.flutter.io:80 failed to respond
> Could not resolve io.flutter:flutter_embedding_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.
> Could not get resource ‘http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutter_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.pom’.
> Could not GET ‘http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutter_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.pom’.
> download.flutter.io:80 failed to respond
> Could not resolve io.flutter:flutter_embedding_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.
> Could not get resource ‘http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutter_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.pom’.
> Could not GET ‘http://download.flutter.io/io/flutter/flutter_embedding_release/1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c/flutter_embedding_release-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.pom’.
> download.flutter.io:80 failed to respond

* 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 26s

1个评论 to “flutter 报错 Could not resolve io.flutter:flutter_embedding_release”

  • 心无痕 说:

    我这改了之后还是编译不过去,我远程依赖aar拉取的时候报的错:ERROR: Failed to resolve: io.flutter:arm64_v8a_release:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c,求指点

  • 留下评论:

    昵称(必须):
    邮箱地址 (不会被公开) (必须):
    站点
    评论 (必须)
    XHTML: 您可以使用这些标记: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>