zoukankan      html  css  js  c++  java
  • 常见flutter报错及解决方法

    常见flutter报错及解决方法,希望对有需要的朋友提供参考。

    错误一:tool-replace meta-data .... 插件冲突

    错误信息如下:

    PS F:Develop_xxxxxflu-projectxxxxx> flutter run
    Running "flutter pub get" in xxxxx...                            30.4s
    Using hardware rendering with device sdk gphone x86. If you get graphics artifacts, consider enabling software rendering with
    "--enable-software-rendering".
    Launching libmain.dart on sdk gphone x86 in debug mode...
    Running Gradle task 'assembleDebug'...
    F:Develop_xxxxflu-projectxxxxxandroidappsrcdebugAndroidManifest.xml:18:17-55 Error:
            Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/provider_paths) from [:flutter_bugly] AndroidManifest.xml:18:17-55
            is also present at [:open_file] AndroidManifest.xml:20:17-50 value=(@xml/filepaths).
            Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':app:processDebugManifest'.
    > Manifest merger failed : Attribute meta-data#android.support.FILE_PROVIDER_PATHS@resource value=(@xml/provider_paths) from [:flutter_bugly] AndroidManifest.xml:18:17-55
            is also present at [:open_file] AndroidManifest.xml:20:17-50 value=(@xml/filepaths).
            Suggestion: add 'tools:replace="android:resource"' to <meta-data> element at AndroidManifest.xml to override.
    
    * 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 2m 6s
    Running Gradle task 'assembleDebug'...
    Running Gradle task 'assembleDebug'... Done                       135.9s (!)
    The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the
    incompatibility.
    Building plugin audioplayers...
    Running Gradle task 'assembleAarRelease'...
    Running Gradle task 'assembleAarRelease'... Done                   65.7s
    √ Built buildappoutputs
    epo.
    Building plugin cipher2...
    Running Gradle tas
    

      解决方法,在项目下的External Libraries下的Flutter Plugins/flutter_bugly-0.2.5/android/src.main/AndroidManifest.xml配置下的<meta-data 里添加 

    tools:replace="android:resource"
    详细见截图如下:

     错误二:Connect to storage.googleapis.com:443 

    Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
    * What went wrong:
    Execution failed for task ':app:compileDebugKotlin'.
    > Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
       > Could not download arm64_v8a_debug.jar (io.flutter:arm64_v8a_debug:1.0.0-fdf4f7883f678eb6d5c30c303c485fae1f8ba0cb)
          > Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-fdf4f7883f678eb6d5c30c303c485fae1f8ba0cb/arm64_v8a_debug-1.0.0-fdf4f78
    83f678eb6d5c30c303c485fae1f8ba0cb.jar'.
             > Could not GET 'https://storage.googleapis.com/download.flutter.io/io/flutter/arm64_v8a_debug/1.0.0-fdf4f7883f678eb6d5c30c303c485fae1f8ba0cb/arm64_v8a_debug-1.0.0-fdf4f7883f678
    eb6d5c30c303c485fae1f8ba0cb.jar'.
                > Connect to storage.googleapis.com:443 [storage.googleapis.com/172.217.160.80] failed: Connection timed out: connect
    
    * 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 46s
    

      解决方法:要翻墙。可能要下载相应包。

  • 相关阅读:
    spring3.1, hibernate4.1 配置备份,struts2.2.1,sitemesh 2.4.2
    java 动态AOP
    制作可以执行的 JAR 文件包及 jar 命令详解
    struts result Annotation 参考
    Android线段与矩形碰撞检测函数
    防止aspxspy木马列服务 iis信息 执行命令提权等操作
    博客园申请及页面定制CSS
    C# 中将月份格式化为英语缩写格式
    通过Web Service获取天气预报并朗读
    windows下html/javascript调用可执行程序
  • 原文地址:https://www.cnblogs.com/wulinzi/p/12552097.html
Copyright © 2011-2022 走看看