惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Engineering at Meta
Engineering at Meta
T
Threatpost
P
Palo Alto Networks Blog
NISL@THU
NISL@THU
O
OpenAI News
Project Zero
Project Zero
G
GRAHAM CLULEY
P
Privacy International News Feed
A
Arctic Wolf
Microsoft Azure Blog
Microsoft Azure Blog
H
Help Net Security
M
MIT News - Artificial intelligence
T
Threat Research - Cisco Blogs
S
Security @ Cisco Blogs
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
D
Docker
aimingoo的专栏
aimingoo的专栏
博客园 - 【当耐特】
N
Netflix TechBlog - Medium
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
W
WeLiveSecurity
P
Proofpoint News Feed
腾讯CDC
Cloudbric
Cloudbric
S
Secure Thoughts
C
Check Point Blog
博客园 - Franky
T
The Exploit Database - CXSecurity.com
T
Troy Hunt's Blog
GbyAI
GbyAI
Security Archives - TechRepublic
Security Archives - TechRepublic
Application and Cybersecurity Blog
Application and Cybersecurity Blog
月光博客
月光博客
C
Cyber Attacks, Cyber Crime and Cyber Security
I
Intezer
TaoSecurity Blog
TaoSecurity Blog
L
Lohrmann on Cybersecurity
V
Visual Studio Blog
F
Fortinet All Blogs
博客园 - 叶小钗
C
CXSECURITY Database RSS Feed - CXSecurity.com
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recorded Future
Recorded Future
C
Cisco Blogs
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research

StudyingLover's Blog

Diffusion Policy笔记 rwkv笔记 act笔记 nanovllm-block_manager opencode多智能体 nanobot-pre-train nanobot-rl nanobot-sft nanobot-checkpoint_manager nanobot-gpt nanobot-mid-train Vision Mamba (Vim)笔记 BPE演示 最后一遍学习Transformer YOLOv5 目标检测笔记 下载根服务器解析记录 Dynaseal A Backend-Controlled LLM API Key Distribution Scheme with Constrained Invocation Parameters 判断链表有环 王道25数据结构勘误 关于perplexity的open-sourcing-r1-1776 AI为什么不像人类一样进行多轮对话 新博客改造日记和功能测试 linuxqq只显示登陆背景图 数字设计和计算机体系结构(机械工业出版社)勘误(自制) Dynaseal:面向未来端侧llm agent的llm api key分发机制 A Definitive Guide to Markdown Style This post is using MDX, Where you can embed JSX and Astro components RT-Patch学习 pydantic实现的LLM ReAct fastapi 和 uvicorn 设置监听 ipv6 pydantic+openai+json 控制大模型输出的最佳范式 解决 Matplotlib Scatter 不支持 Marker 列表的问题:mscatter 实现 roofline model zhipuAI接口兼容openai 在docker部署fastapi宝塔里使用nginx反代套上cloudflare获取请求的真实ip clion搭建libbpf-bootstrap开发环境 coze+coze-discord-proxy+ChatNextWebUI实现AI自由 安卓内核时间使用的是UTC时间 colab运行google最新开源模型Gemma Sora技术报告 视频生成模型作为世界模拟器 笔记 fastapi集成google auth登录 linux下NTFS磁盘报错输入输出错误 Venn-Abers 预测器 基于Venn-Abers预测器的系统日志异常检测方法_顾兆军 手机平板远程访问kvm虚拟机的windows phi-2弱智吧测评 poe的gemini pro或是百度开发 google gemini api使用 google gemini api申请 构建用于复杂数据处理的高效UDP服务器和客户端 matplotlib中文字体渲染 TruFor笔记和代码复现 深入分析:GitHub Trending 项目 "multipleWindow3dScene" pua大模型 ggml教程|mnist手写体识别量化推理 xgboost2.0最佳实践 xgboost使用GPU最佳实践 马踏棋盘 cloudlflare推理llama2 docker搭建elasticsearch并使用python连接 FreeU-文字生成图片的免费午餐笔记 使用xgboost的c接口推理模型 Archlinux使用CMake调用xgboost的c接口 m2cgen生成机器学习c语言推理代码 xgboost模型序列化存储并推理 speculative-sampling笔记 prompt2model笔记 RoboTAP笔记 自建obsidian同步服务 MediaPipe即将推出图像生成服务 Dual-Stream Diffusion Net for Text-to-Video Generation笔记 ViT在DDPM取代UNet(DiT) arch4edu搞崩了我的flutter LISA(推理分割)笔记 在终端绘制GPU显存使用曲线 GPTBot介绍 arch蓝牙无法连接 GPU部署llama-cpp-python(llama.cpp通用) 花式求GCD 使用llama构建一个蜜罐(前端) 使用llama构建一个蜜罐(后端) llama-cpp-python快速上手 快速上手llama2.c(更新版) Paper Gestalt笔记 DINO-v2笔记 快速上手llama2.c AnyDoor笔记 Archlinux安装scrcpy加载共享库出错 error while loading shared libraries:libusb-1.0.so.0:wrong ELF class:ELFCLASS32 npc_gzip笔记 python调用c++函数 Filesystem type ntfs3,ntfs not configured in kernel open_clip编码图像和文本 PicGo配置CloudflareR2图片储存 ArchlinuxGnome快捷键打开终端 clip-interrogator代码解析 GroundingDINO安装报错解决 2023华为鲲鹏畅想日暨西安高新国际会议中心零食午饭测评 RoboMaster开源仓库汇总(长期更新) 没有手都可以在腾讯云创建镜像 I3D笔记
archlinux flutter开发踩坑
About the Author StudyingLover · 2024-02-11 · via StudyingLover's Blog

archlinux flutter开发踩坑

archlinux是个好东西,但是开发flutter坑不少。2023年5月我配置了flutter,后来用得不多,23年11月还尝试过但是失败,最近又要使用,就来解决下。

20230210

今天需要写一个手机app,突然发现构建不出来了,报错

> Failed to create parent directory '/opt/flutter/packages/flutter_tools/gradle/.gradle' when creating directory '/opt/flutter/packages/flutter_tools/gradle/.gradle/buildOutputCleanup'

* 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 48s
Exception: Gradle task assembleDebug failed with exit code 1

你他妈别说,这问题还麻烦,只看这个还看不出来

先sudo运行一下,运行的时候保留环境变量

sudo -E flutter run

失败了,同样问题。然后单独在Android下面跑一个./gradlew clean

报错

Welcome to Gradle 7.5! Here are the highlights of this release: - Support for Java 18 - Support for building with Groovy 4 - Much more responsive continuous builds - Improved diagnostics for dependency resolution For more details see https://docs.gradle.org/7.5/release-notes.html Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details FAILURE: Build failed with an exception. * Where: Settings file '/home/client/android/settings.gradle' line: 25 * What went wrong: Error resolving plugin [id: 'dev.flutter.flutter-plugin-loader', version: '1.0.0'] > A problem occurred configuring project ':gradle'. > Could not create service of type OutputFilesRepository using ExecutionGradleServices.createOutputFilesRepository(). > java.io.FileNotFoundException: /opt/flutter/packages/flutter_tools/gradle/.gradle/buildOutputCleanup/buildOutputCleanup.lock (权限不够) * 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 1s

写的很明显权限不够,给当前用户上权限

sudo chown -R $(whoami) /opt/flutter

再次运行

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration 'classpath'.
> Could not resolve com.android.tools:sdk-common:30.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0 > com.android.tools.lint:lint-model:30.3.0
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0 > com.android.tools.build:builder:7.3.0
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0 > com.android.tools.build:builder:7.3.0 > com.android.tools.build:manifest-merger:30.3.0
   > Could not resolve com.android.tools:sdk-common:30.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/30.3.0/sdk-common-30.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/30.3.0/sdk-common-30.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.tools:sdklib:30.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0 > com.android.tools.build:builder:7.3.0
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0 > com.android.tools.build:builder:7.3.0 > com.android.tools.build:manifest-merger:30.3.0
   > Could not resolve com.android.tools:sdklib:30.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/30.3.0/sdklib-30.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/30.3.0/sdklib-30.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.tools:repository:30.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
   > Could not resolve com.android.tools:repository:30.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.3.0/repository-30.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/repository/30.3.0/repository-30.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.tools.build:aaptcompiler:7.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
   > Could not resolve com.android.tools.build:aaptcompiler:7.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/7.3.0/aaptcompiler-7.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/aaptcompiler/7.3.0/aaptcompiler-7.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.tools.lint:lint-typedef-remover:30.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
   > Could not resolve com.android.tools.lint:lint-typedef-remover:30.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-typedef-remover/30.3.0/lint-typedef-remover-30.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/lint/lint-typedef-remover/30.3.0/lint-typedef-remover-30.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.databinding:baseLibrary:7.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0 > androidx.databinding:databinding-compiler-common:7.3.0
   > Could not resolve com.android.databinding:baseLibrary:7.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.3.0/baseLibrary-7.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/7.3.0/baseLibrary-7.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
   > Could not resolve com.android.tools.utp:android-device-provider-ddmlib-proto:30.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-ddmlib-proto/30.3.0/android-device-provider-ddmlib-proto-30.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-device-provider-ddmlib-proto/30.3.0/android-device-provider-ddmlib-proto-30.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
   > Could not resolve com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:30.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-additional-test-output-proto/30.3.0/android-test-plugin-host-additional-test-output-proto-30.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-additional-test-output-proto/30.3.0/android-test-plugin-host-additional-test-output-proto-30.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake
> Could not resolve com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.0.
  Required by:
      unspecified:unspecified:unspecified > com.android.application:com.android.application.gradle.plugin:7.3.0 > com.android.tools.build:gradle:7.3.0
   > Could not resolve com.android.tools.utp:android-test-plugin-host-retention-proto:30.3.0.
      > Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-retention-proto/30.3.0/android-test-plugin-host-retention-proto-30.3.0.pom'.
         > Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/utp/android-test-plugin-host-retention-proto/30.3.0/android-test-plugin-host-retention-proto-30.3.0.pom'.
            > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/7.5/userguide/build_environment.html#gradle_system_properties
               > Remote host terminated the handshake

* 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 54s
4 actionable tasks: 4 executed

网络问题,先看一下java版本

java -version
openjdk version "17.0.10" 2024-01-16
OpenJDK Runtime Environment (build 17.0.10+7)
OpenJDK 64-Bit Server VM (build 17.0.10+7, mixed mode)

可以显式地配置Gradle使用TLS协议,在gradle.properties文件

systemProp.jdk.tls.client.protocols=TLSv1.2,TLSv1.3

这个时候./gradlew clean可以正常工作了,但是./gradlew assembleDebug 不能正常工作

这个时候,我打开了Android studio, it words!