zoukankan      html  css  js  c++  java
  • Flutter依赖(引入)蒲公英SDK导致报错

    大概会报这几个错

    Finished with error: Gradle task assembleDebug failed with exit code 1
    G:FlutterSDKfluttersdk.pub-cachehostedpub.flutter-io.cnflutter_pgyer-1.0.1androidsrcmainjavacomcrazecoderflutter.pgyerFlutterPgyerPlugin.java:214: ����: �Ҳ�������
                            public void downloadSuccessful(File file) {
                                                           ^
      ����: �� File
    1 ������
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':flutter_pgyer:compileDebugJavaWithJavac'.
    > Compilation failed; see the compiler error output for details.
    
    * 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 11s
    Finished with error: Gradle task assembleDebug failed with exit code 1

    如果在flutter 项目中引入蒲公英SDK报错

    那么  大概 用pub的方式引入也就是这样

    pub

    flutter_pgyer: ^1.0.1

    如果用上面这种方法引入蒲公英SDK,那么你的问题就可以在这里得到解决,如果不是,你就可以退出了

    解决方法:使用GitHub的方式引入

      flutter_pgyer:
        git:
          url: https://github.com/crazecoder/flutter_pgyer.git

     运行成功,然后就可以写你的更新的逻辑代码了,这里就暂时没有这个代码,因为我也是第一次用,还没写到,等我写好了再更新

    这时候虽然可以运行,但是打包失败这时候我们需要改源码

     找到蒲公英的包 flutter_pgyer打开build.gradle,

    compileSdkVersion 28这里的版本默认是22,我这里已经改过了,我们要改为28或以上然后就可以编译通过了
  • 相关阅读:
    FastReport报表控件使用技巧总结
    WinAPI: ShellExecute
    Delphi Excel 操作大全
    DATEADD和DATEDIFF函数、其他日期处理方法 、已打开的端口、FORMAT函数
    javascript-时间戳
    js-jquery-插件开发(二)【最终插件是最后一个,中间是过程】
    js-jquery-插件开发(一)
    Java-idea-eclipse-快捷键【mac,win】
    Java-idea-生成for循环
    Java-idea-设置类头注释和方法注释
  • 原文地址:https://www.cnblogs.com/inthecloud/p/12304053.html
Copyright © 2011-2022 走看看