当前位置: 首页 > wzjs >正文

镇江市建设审图网站做网站建设的上市公司有哪些

镇江市建设审图网站,做网站建设的上市公司有哪些,上海html5网站制作,阿里云网站建设方案最近在研究一个验证码转发的app,原理是尝试读取手机中对应应用的验证码进行自动转发。本次尝试用flutter开发,因为之前没有flutter开发的经验,遇到了诸多环境方面的问题,汇总一些常见的问题如下。希望帮助到入门的flutter开发者&a…

最近在研究一个验证码转发的app,原理是尝试读取手机中对应应用的验证码进行自动转发。本次尝试用flutter开发,因为之前没有flutter开发的经验,遇到了诸多环境方面的问题,汇总一些常见的问题如下。希望帮助到入门的flutter开发者,避免踩坑。

problems

1. running failed

1.1. Bug Description

FAILURE: Build failed with an exception.* What went wrong:
Execution failed for task ':gradle:compileGroovy'.
> BUG! exception in phase 'semantic analysis' in source unit 'C:\dev\flutter\packages\flutter_tools\gradle\src\main\groovy\app_plugin_loader.groovy' Unsupported class file major version 65* 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.orgBUILD FAILED in 31s
Running Gradle task 'assembleDebug'...                             32.3s┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐  
│ [!] Your project's Gradle version is incompatible with the Java version that Flutter is using for Gradle.                                      │  
│                                                                                                                                                │
│ If you recently upgraded Android Studio, consult the migration guide at https://flutter.dev/to/java-gradle-incompatibility.                    │  
│                                                                                                                                                │  
│ Otherwise, to fix this issue, first, check the Java version used by Flutter by running `flutter doctor --verbose`.                             │  
│                                                                                                                                                │  
│ Then, update the Gradle version specified in D:\Project\Verify_Code_App\verify_code_app\android\gradle\wrapper\gradle-wrapper.properties to be │  
│ compatible with that Java version. See the link below for more information on compatible Java/Gradle versions:                                 │  
│ https://docs.gradle.org/current/userguide/compatibility.html#java                                                                              │  
│                                                                                                                                                │  
│                                                                                                                                                │  
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

1.2. Solution

执行flutter doctor --verbose发现

Java binary at: D:\Android\Android Studio\jbr\bin\java

说明java地址指向不对,要使用flutter config --jdk-dir <jdk目录>来指定java目录

2. settings.gradle.kts配置

2.1. Bug Description

配置gradle plugin国内镜像源时,使用了

pluginManagement {repositories {maven { url 'https://plugins.gradle.org/m2/' }maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}gradlePluginPortal()google()mavenCentral()}
}

报错如下:

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
e: D:\Project\Verify_Code_App\verify_code_app\android\settings.gradle.kts:14:25: Too many characters in a character literal ''https://maven.aliyun.com/nexus/content/repositories/google''
e: D:\Project\Verify_Code_App\verify_code_app\android\settings.gradle.kts:15:25: Too many characters in a character literal ''https://maven.aliyun.com/nexus/content/groups/public''
e: D:\Project\Verify_Code_App\verify_code_app\android\settings.gradle.kts:16:25: Too many characters in a character literal ''https://maven.aliyun.com/nexus/content/repositories/jcenter''FAILURE: Build failed with an exception.* Where:
Settings file 'D:\Project\Verify_Code_App\verify_code_app\android\settings.gradle.kts' line: 14* What went wrong:
Script compilation errors:Line 14:         maven { url=uri('https://maven.aliyun.com/nexus/content/repositories/google') }^ Too many characters in a character literal ''https://maven.aliyun.com/nexus/content/repositories/google''    Line 15:         maven { url=uri('https://maven.aliyun.com/nexus/content/groups/public') }^ Too many characters in a character literal ''https://maven.aliyun.com/nexus/content/groups/public''Line 16:         maven { url=uri('https://maven.aliyun.com/nexus/content/repositories/jcenter')}^ Too many characters in a character literal ''https://maven.aliyun.com/nexus/content/repositories/jcenter''   3 errors

2.2. Solution

网上的教程大多是按build.gradle文件来配置的,然而本项目采用了build.gradle.kts,所以需要修改为

修改为

repositories {maven { url=uri("https://plugins.gradle.org/m2/") }maven { url=uri("https://maven.aliyun.com/nexus/content/repositories/google") }maven { url=uri("https://maven.aliyun.com/nexus/content/groups/public") }maven { url=uri("https://maven.aliyun.com/nexus/content/repositories/jcenter")}gradlePluginPortal()google()mavenCentral()
}

3. 第三方库命名空间NameSpace问题

3.1. Bug Description

运行flutter项目时报错,提示找不到第三方库的命名空间:

Namespace not specified. Specify a namespace in the module's build file

3.2. Solution

build.gradle.kts文件中添加如下代码,来对第三方库进行命名空间指定:

subprojects {afterEvaluate {if (this is org.gradle.api.Project && (plugins.hasPlugin("com.android.library") || plugins.hasPlugin("com.android.application"))) {val androidExtension = extensions.findByType<com.android.build.gradle.BaseExtension>()androidExtension?.let { android ->val currentNamespace = android.namespaceprintln("project: ${this.name} Namespace get: $currentNamespace")val packageName = currentNamespace?: android.defaultConfig.applicationId?: android.sourceSets.getByName("main").manifest.srcFile.readText().let { manifestText ->val regex = Regex("package=\"([^\"]*)\"")regex.find(manifestText)?.groupValues?.get(1)}?: group.toString()android.namespace = packageNameprintln("Namespace set to: $packageName for project: ${this.name}")val manifestFile = android.sourceSets.getByName("main").manifest.srcFileif (manifestFile.exists()) {var manifestText = manifestFile.readText()if (manifestText.contains("package=")) {manifestText = manifestText.replace(Regex("package=\"[^\"]*\""), "")manifestFile.writeText(manifestText)println("Package attribute removed in AndroidManifest.xml for project: ${this.name}")} else {println("No package attribute found in AndroidManifest.xml for project: ${this.name}")}} else {println("AndroidManifest.xml not found for project: ${this.name}")}}}}
}

4. sms_advanced第三方依赖问题

4.1. Bug Description

在编写flutter项目时,引入了sms_advanced第三方库,但是在运行时,出现了如下错误:

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':sms_advanced' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

pubspec.yml中引入的依赖:

dependencies:flutter:sdk: flutterhttp: ^1.3.0shared_preferences: ^2.5.2# The following adds the Cupertino Icons font to your application.# Use with the CupertinoIcons class for iOS style icons.cupertino_icons: ^1.0.8sms_advanced: ^1.1.0

4.2. Solution

网上大多数解决方案是修改android/build.gradle文件,将kotlin版本修改为1.5.20以上,这个方案需要对sms_advanced依赖中的文件进行操作。我尝试前往对应插件库的github项目地址,发现作者最新的更新仅上传了github并未上传到pub,因此无法通过修改版本号的方式解决问题。

在这里插入图片描述

因此我尝试修改dependencies,直接从git仓库中引入依赖,如下:

dependencies:flutter:sdk: flutterhttp: ^1.3.0shared_preferences: ^2.5.2# The following adds the Cupertino Icons font to your application.# Use with the CupertinoIcons class for iOS style icons.cupertino_icons: ^1.0.8sms_advanced:git:url: git@github.com:EddieKamau/sms_advanced.git

最终得以解决。


文章转载自:

http://VO28t8rH.gfpyy.cn
http://I1K1iiry.gfpyy.cn
http://agtFlP2X.gfpyy.cn
http://vq9Qeujw.gfpyy.cn
http://UrVIxlU3.gfpyy.cn
http://hjHnRnSp.gfpyy.cn
http://zGNaUGvK.gfpyy.cn
http://X2YRqKDq.gfpyy.cn
http://P3FA7P3a.gfpyy.cn
http://QNKRiP3p.gfpyy.cn
http://WRcYioYI.gfpyy.cn
http://S3kzmbcA.gfpyy.cn
http://zqyDH9tl.gfpyy.cn
http://KLVCTR85.gfpyy.cn
http://bj3NDSrS.gfpyy.cn
http://oxPC3dki.gfpyy.cn
http://HjJNQiH2.gfpyy.cn
http://Ogd3s208.gfpyy.cn
http://DKdirAkG.gfpyy.cn
http://FSbEHCHO.gfpyy.cn
http://WUQG4PON.gfpyy.cn
http://EJFtjmbB.gfpyy.cn
http://hFeQ9Laz.gfpyy.cn
http://yg041G2t.gfpyy.cn
http://VcyPfGs2.gfpyy.cn
http://UEsPzH3a.gfpyy.cn
http://v2YW8oOr.gfpyy.cn
http://CxUWANaN.gfpyy.cn
http://1UklTzRq.gfpyy.cn
http://eMrUbBUi.gfpyy.cn
http://www.dtcms.com/wzjs/625858.html

相关文章:

  • 全国企业信息公示查询系统官网浙江嘉兴seo网站优化推广
  • 毕节地区建设网站网站建设的业务范围
  • 网站建设属那种营业简书 导入 wordpress
  • 网站静态化 更新网站开发哪些公司
  • 最好的网站开发平台小公司使用的网站开发
  • 纪实摄影网站推荐怎么创建网站校园表白墙
  • 新网站前期seo怎么做php网页模板
  • 网站建设公司资质邢台经济开发区
  • 泰安市建设职工培训中心网站官网网站建设属于IT吗
  • 沈阳创新网站建设报价网站设置万事达u卡
  • 做网站的云服务器选什么大学生就业网站开发源码
  • 住房建设城乡网站微网站功能列表
  • 个人博客网站开发的意义美工做图详情页设计
  • 鄂尔多斯 网站建设网站建设知乎
  • win7本地做网站为什么在百度搜不到我的网站
  • 网站服务器 优帮云兰州公司网站建设
  • 搭建网站需要程序免费起名网最好的网站
  • 网站建设制作与运营wordpress开发教程
  • 推荐一本学做网站的书wordpress主题偷
  • 东莞微信网站开发网站规范建设
  • 合肥最好的网站建设公司排名网页微信版传输助手
  • 全站flash网站国际品牌的品牌策划公司
  • 太原市建设厅官方网站网站的标题
  • 做设计太依赖网站素材项目负责人质量建设厅官方网站
  • 新的网站的建设步骤网页设计师 培训
  • 做棋盘游戏辅助的网站wordpress判断登录
  • 福州网站建设专业定制公司网络维护服务
  • 上海模板网站手工制作花朵
  • 新网站不被收录的原因wordpress支付插件安装
  • 魔鬼做交易网站怎么建设网站上传音乐