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

安装 Android Studio 2024.1.1.6(Koala SDK35)和过程问题解决

记录更新Android Studio版本及适配Android V应用配置的一些过程问题。

  • 安装包:android-studio-2024.1.1.6-windows.exe
  • 原版本:Android Studio23.2.1.23

Koala 安装过程

Uninstall old version 不会删除原本配置(左下角提示)

Uninstall old version
Uninstall old version
Android Studio Setup
Android Studio Setup

Choose Component
Choose Component

Configuration Settings 可自选路径 E:\SOFTWARE\Android\Android Studio 24.1.1.6

Configuration Settings
Configuration Settings

Choose Start Menu Folder 配置桌面开始图标

Choose Start Menu Folder
Choose Start Menu Folder

 安装完成 ,提示马上启动

Install Complete
Install Complete

【问题解决】启动报错 Operation not supported: bind 

Start fail

Internal error. Please refer to https://issuetracker.google.com/issues/new?component=192708

java.net.SocketException: Operation not supported: bind
    at java.base/sun.nio.ch.UnixDomainSockets.bind0(Native Method)
    at java.base/sun.nio.ch.UnixDomainSockets.bind(UnixDomainSockets.java:129)
    at java.base/sun.nio.ch.ServerSocketChannelImpl.unixBind(ServerSocketChannelImpl.java:319)
    at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:292)
    at java.base/java.nio.channels.ServerSocketChannel.bind(ServerSocketChannel.java:224)
    at com.intellij.platform.ide.bootstrap.DirectoryLock.tryListen(DirectoryLock.java:281)
    at com.intellij.platform.ide.bootstrap.DirectoryLock.lockOrActivate(DirectoryLock.java:147)
    at com.intellij.platform.ide.bootstrap.StartupUtil$lockSystemDirs$result$1.invokeSuspend(main.kt:528)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
    at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

-----
Your JRE: 17.0.10+0--11609105 amd64 (JetBrains s.r.o.)
E:\SOFTWARE\Android\Android Studio 24.1.1.6\jbr

解决方案:到bin文件下执行studio.bat打开(或者双击打开studio.bat--For Windows)

如路径:E:\SOFTWARE\Android\Android Studio 24.1.1.6\bin\studio.bat

IDE初始化和使用

如果没有配置SDK,打开软件就会提示

然后打开项目的时候会提示选用Android Studio还是Project的SDK。

To keep results consistent between IDE and command line builds, only one path can be used. Do you want to: 

[1] Use Android Studio's default SDK (modifies the project's local.properties file.) 

[2] Use the project's SDK (modifies Android Studio's default.)  Note that switching SDKs could cause compile errors if the selected SDK doesn't have the necessary Android platforms or build tools.

【配置】SDK和Gradle

当前Android Studio无法下载高版本的SDK和Gradle,可以自行下载好然后放到相应工作路径。

Android V的preview SDK和build tool,分别拷贝到SDK\build-tools和Sdk\platforms文件目录即可。那么配置项目gradle的时候需要名称对应。

【问题解决】Namespace not specified.

Build Output

Namespace not specified. Specify a namespace in the module's build file: E:\code\Demo_hotfix\build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

A problem occurred configuring root project 'Demo'.
> Could not create an instance of type com.android.build.api.variant.impl.ApplicationVariantImpl.
   > Namespace not specified. Specify a namespace in the module's build file: E:\code\Demo_hotfix\build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

* 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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 7s

分析:在Android U上编译还没有命名空间的要求。

解决方案:在app的build.gradle添加namespace

android {namespace 'com.ddd.demo'
}

应用Debug

当前配置

//这个看着没用,kotlin才需要 添加android-
ext {compileSdkVersion = 'android-VanillaIceCream'
}android {namespace 'com.ddd.demo'compileSdkPreview 'VanillaIceCream'//compileSdkVersion 35buildToolsVersion '35.0.0 rc3'defaultConfig {applicationId "com.ddd.demo"minSdkVersion 30targetSdkVersion 35versionName getVersionNamePrefix()}
}

修改namespace、sdk版本等配置后编译报错,其实可以通过描述Recommendation找到解决方案。

1、[warn]compileSdkPreview

第一条只是警告,还不是报错。

compileSdkPreview = "VanillaIceCream" has not been tested with this version of the Android Gradle plugin.

This Android Gradle plugin (8.5.0-alpha08) was tested up to compileSdk = 34.

If you are already using the latest preview version of the Android Gradle plugin,
you may need to wait until a newer version with support for compileSdkPreview = "VanillaIceCream" is available.

For more information refer to the compatibility table:
https://d.android.com/r/tools/api-level-support

To suppress this warning, add/update
    android.suppressUnsupportedCompileSdk=VanillaIceCream
to this project's gradle.properties.

2、[error]:processDebugMainManifest ※

> Task :processDebugMainManifest FAILED
Incorrect package="com.ddd.phone" found in source AndroidManifest.xml: E:\code\Demo_V_hotfix\AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
Recommendation: remove package="com.ddd.phone" from the source AndroidManifest.xml: E:\code\Demo_V_hotfix\AndroidManifest.xml.

Execution failed for task ':processDebugMainManifest'.
> Incorrect package="com.ddd.phone" found in source AndroidManifest.xml: E:\code\Demo_V_hotfix\AndroidManifest.xml.
  Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
  Recommendation: remove package="com.ddd.phone" from the source AndroidManifest.xml: E:\code\Demo_V_hotfix\AndroidManifest.xml.

* 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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 717ms
44 actionable tasks: 1 executed, 43 up-to-date

解决:将build.gradle的命名空间跟AndroidManifest.xml配置的packages内容一致。

3、[error]Incorrect package="xxxx" found in AndroidManifest.xml

是因为定义了不同的命名空间和进程包名等,虽然说建议移除AndroidManifest中的packages配置,但是根由不是这个,解决了问题2就能解决此问题。

Incorrect package="com.ddd.phone" found in source AndroidManifest.xml: E:\code\Demo_V_hotfix\AndroidManifest.xml.
Setting the namespace via the package attribute in the source AndroidManifest.xml is no longer supported.
Recommendation: remove package="com.ddd.phone" from the source AndroidManifest.xml: E:\code\Demo_V_hotfix\AndroidManifest.xml.

其他

官方说明 :设置 Android 15 SDK  |  Android Developers

//更改 gradle 配置:
//AGP > 7.0.0:
//groovy:
android {compileSdkPreview "VanillaIceCream"...defaultConfig {targetSdkPreview "VanillaIceCream"}
}//kotlin:
android {compileSdkPreview = "VanillaIceCream"...defaultConfig {targetSdkPreview = "VanillaIceCream"}
}//AGP 4.2.0 或更低:
//groovy:
android {compileSdkVersion "android-VanillaIceCream"...defaultConfig {targetSdkVersion "android-VanillaIceCream"}
}//kotlin:
android {compileSdkPreview = "android-VanillaIceCream"...defaultConfig {targetSdkPreview = "android-VanillaIceCream"}
}

相关文章:

安装 Android Studio 2024.1.1.6(Koala SDK35)和过程问题解决

记录更新Android Studio版本及适配Android V应用配置的一些过程问题。 安装包:android-studio-2024.1.1.6-windows.exe原版本:Android Studio23.2.1.23 Koala 安装过程 Uninstall old version 不会删除原本配置(左下角提示) Un…...

美团一面:什么是CAS?有什么优缺点?我说你说的是AtomicInteger吗?

引言 传统的并发控制手段,如使用synchronized关键字或者ReentrantLock等互斥锁机制,虽然能够有效防止资源的竞争冲突,但也可能带来额外的性能开销,如上下文切换、锁竞争导致的线程阻塞等。而此时就出现了一种乐观锁的策略&#x…...

【linux】(2)文件内容排序sort

sort 是一个用于排序文件内容的命令行工具,在 Linux 和 Unix 系统中非常常用。 基本用法 sort [OPTION]... [FILE]...常用选项 按数值排序 -n sort -n filename例子:对包含数值的文件进行排序。 按字典顺序排序 -d sort -d filename例子&#xff1…...

css 图片上添加模糊背景的文字内容

html部分 <div class"onlogo"> <img src"../assets/img/banner.png" /><div class"imgText"><div class"title">一体化电子印章应用服务</div><div class"content">为企业提供安全可靠…...

Python3 函数参数

前言 本文主要介绍python中的函数参数&#xff0c;主要内容包括形式参数与实际参数的概念、位置参数、关键字参数、默认参数、可变参数。 文章目录 前言一、形式参数与实际参数的概念二、位置参数&#xff08;也叫必需参数&#xff09;三、关键字参数四、默认参数五、可变参数…...

精准检测,可燃气体报警系统的技术原理与特点

在现代化的工业生产与日常生活中&#xff0c;可燃气体泄露事故频发&#xff0c;给人们的生命和财产安全带来了严重威胁。 因此&#xff0c;可燃气体报警检测系统的应用变得尤为重要。它不仅能够实时监测环境中的可燃气体浓度&#xff0c;还能在发现异常情况时及时报警&#xf…...

6月2(信息差)

&#x1f30d;特斯拉&#xff1a;Model3高性能版预计6月中旬开启首批交付 &#x1f384;微软对开源字体 Cascadia Code 进行重大更新 ✨天猫618加码引爆消费热潮 截至晚9点185个品牌成交破亿 1.瑞士清洁科技公司Librec开发废旧锂离子电池回收技术&#xff0c;可回收电池90%的…...

先锋文汇发稿技巧方法

v&#xff1a;yangwei013049 看到标题&#xff0c;有的同志也许会说&#xff0c;投稿就是把稿子发走就行了呗&#xff0c;这要讲究什么方法呢&#xff1f;其实&#xff0c;投稿里面也有学问。不会投稿&#xff0c;方法不当&#xff0c;往往得不到好的效果。 从我多年的实践和…...

无人机推流/RTMP视频推拉流EasyDSS无法卸载软件是什么原因?

视频推拉流/直播点播EasyDSS平台支持音视频采集、视频推拉流、播放H.265编码视频、存储、分发等视频能力服务&#xff0c;在应用场景中可实现视频直播、点播、转码、管理、录像、检索、时移回看等。此外&#xff0c;平台还支持用户自行上传视频文件&#xff0c;也可将上传的点播…...

QML信号连接到c++的槽函数(五)

文章目录 前言一、QML Signal and Handler Event System二、QML信号连接到c++的槽函数代码实例1. 创建一个QML 工程2. 用C++ 实现一个QML Types3. 代码实例4. 运行结果总结参考资料前言 本文主要介绍,如何将QML 中的信号连接到C++ 中的槽函数 软硬件环境: 硬件:PC 软件:wi…...

[Windows] 植物大战僵尸杂交版

游戏包含冒险模式、挑战模式、生存模式三种不同玩法。冒险模式主打关卡闯关&#xff0c;挑战模式则挑战特殊设计的关卡&#xff0c;生存模式结合无尽模式和特殊地图&#xff0c;各具特色。玩家可根据喜好自由选择模式&#xff0c;体验不同的游戏乐趣。快来尝试这款独特的pvz游戏…...

JVM之【GC-可达性分析算法】

在Java虚拟机&#xff08;JVM&#xff09;中&#xff0c;可达性分析算法&#xff08;Reachability Analysis&#xff09;用于垃圾收集&#xff0c;以确定哪些对象是“可达”的&#xff0c;即哪些对象仍然有用&#xff0c;哪些对象可以被回收。下面是对可达性分析算法及其底层实…...

【机器学习】——驱动智能制造的青春力量,优化生产、预见故障、提升质量

目录 一.优化生产流程 1.1 数据收集 1.2 数据预处理 1.3 模型训练 1.4 优化建议 1.5 示例代码 二.预测设备故障 2.1 数据收集 2.2 数据预处理 2.3 模型训练 2.4 故障预测 2.5 示例代码 三.提升产品质量 3.1 数据收集 3.2 数据预处理 3.3 模型训练 3.4 质量提升…...

Python实用代码片段分享(三)

在今天的博文中&#xff0c;我们将继续分享一些Python编程中非常实用的代码片段。这些代码片段将帮助你更高效地处理常见任务&#xff0c;从字符转换到数据类型检查&#xff0c;应有尽有。 1. ord函数和chr函数 Python的ord()函数可以返回Unicode字符对应的ASCII码值&#xf…...

树形结构-CRUD接口

先看一下效果&#xff1a;整体的效果 新增效果 --默认值是 default 修改效果 - 大致效果如上 --------------------------------------------------------------------------------------------------------------------------------- 下面讲解代码如何实现的 根据你使用…...

【Qt知识】Qt窗口坐标系

Qt的窗口坐标体系遵循标准的计算机图形坐标系统规则 Qt窗口坐标体系特点 坐标原点&#xff1a;窗口坐标体系的原点位于窗口的左上角&#xff0c;即坐标(0, 0)位置。 轴方向&#xff1a; X轴&#xff1a;向右为正方向&#xff0c;随着X坐标值的增加&#xff0c;元素在窗口中从…...

SAP Build引言

前言 SAP Build 似乎是一个整合了很多低代码或无代码产品的平台&#xff0c;最早的时候应该都是各自分开的几个产品&#xff0c;近年合并到一块上了SAP Build平台 现在看官网的介绍应该是有三四个产品被集成进来了&#xff0c;分别是SAP IRPA&#xff0c;SAP Workflow&#xf…...

2024上海国际钢丝绳及吊索具展览会

2024上海国际钢丝绳及吊索具展览会 2024 Shanghai International Wire Rope and Hanger Exhibition 时间&#xff1a;2024年12月18日--20日 地点&#xff1a;上海新国际博览中心 详询主办方陆先生 I38&#xff08;前三位&#xff09; I82I&#xff08;中间四位&#xff…...

记一次mysql索引优化

生产日志告警出现一条慢 sql 告警, 通过 sql 监控平台拿到 这条sql 语句是 : SELECTid,report_id,report_detail_id,item_code,report_type,photo FROM**** 表 WHEREdel_flag 0 AND (report_type 1 AND report_detail_id IN ( 1742 )) 之后用 explain 分析这条 sql 的命中…...

【Javascript系列】Terser通过调用API来实现代码的压缩和优化功能

Terser通过调用API来实现代码的压缩和优化功能 起源通过API来调用API调用过程中的一个隐含的技术点 - 异步调用和Promise对象官方文档中的一个有点容易忽略和混淆的地方关于Promise 起源 书接 上回&#xff0c;对Terser的功能做了一个初步的探索。在官方的主页上&#xff0c;有…...

498元!某国产12代i7云终端小钢炮,仅1.7L迷你主机,可上i7-12700处理器,最大支持双M2+SATA三盘位,可惜还是准系统传家宝!

要说小主机品牌种类规格方面&#xff0c;最为丰富的不是个人家用消费级市场&#xff0c;而是云终端&#xff0c;痩客户机类型产品。奈何如今大环境不景气&#xff0c;再叠加如今处理器性能进步明显&#xff0c;以英特尔12代平台为例&#xff0c;如今依旧还是主流&#xff0c;所…...

【 linux 】理解进程状态

目录 1.僵尸进程与孤儿进程 1.1 孤儿进程 1.2 僵尸进程&#xff08;Z&#xff09; 2.进程状态 3.进程退出与进程等待 3.1 进程退出 3.2 进程等待 3.2.1 wait和waitpid对比 3.3 WEXITSTATUS 和 WIFEXITED 1.僵尸进程与孤儿进程 1.1 孤儿进程 父进程结束了子进程还没有…...

Microsoft Defender双零日在野利用全解析:从BlueHammer到RedSun的终端沦陷之路

前言 2026年5月20日&#xff0c;微软安全响应中心(MSRC)发布紧急安全公告&#xff0c;承认旗下Microsoft Defender存在两个已被野外利用超过一个月的零日漏洞——CVE-2026-41091与CVE-2026-45498。同日&#xff0c;美国国土安全部下属的网络安全与基础设施安全局(CISA)将这两个…...

美容顾问转型AI训练师:2024紧缺新职业认证路径(含国家人社部备案课程编号)

更多请点击&#xff1a; https://kaifayun.com 第一章&#xff1a;AI Agent美容行业应用概述 AI Agent正以前所未有的深度融入美容行业&#xff0c;从智能肤质分析、个性化护肤方案生成&#xff0c;到虚拟试妆、客户行为预测与自动化私域运营&#xff0c;其核心价值在于将非结…...

岩土工程渗流问题之有限单元法--坝基渗流、围堰、土石坝自由面、黏土垫层防渗、污染土固化后渗控

第一天 有限元编程基础知识1.有限单元法基础简介&#xff08;离散化、存储策略及方程解法、边界条件的处理&#xff09;2.编程语言Fortran及编译工具Intel Visual Fortran(IVF)简介3.Fortran/Matlab/Julia等开源代码及程序库&#xff08;geomlib/femlib&#xff09;简介4.水工…...

从开发者视角浅谈Taotoken用量看板对于日常调试与优化的辅助作用

&#x1f680; 告别海外账号与网络限制&#xff01;稳定直连全球优质大模型&#xff0c;限时半价接入中。 &#x1f449; 点击领取海量免费额度 从开发者视角浅谈Taotoken用量看板对于日常调试与优化的辅助作用 在日常开发工作中&#xff0c;当我们接入大模型API来构建智能功能…...

IntelliJ IDEA 2023.3 集成 Maven 3.8.3 保姆级避坑指南:从环境变量到项目构建全流程

IntelliJ IDEA 2023.3 与 Maven 3.8.3 深度集成实战&#xff1a;从零构建企业级Java项目 作为一名长期使用IntelliJ IDEA进行Java开发的工程师&#xff0c;我深刻体会到Maven与IDE无缝集成的重要性。每次新版本发布&#xff0c;那些看似简单的配置背后往往隐藏着令人头疼的兼容…...

K12教师必读:用AI Agent 15分钟生成个性化学习路径(附可即用Prompt模板库)

更多请点击&#xff1a; https://codechina.net 第一章&#xff1a;AI Agent教育应用的范式变革 传统教育系统长期依赖“教师讲授—学生听记—统一测评”的线性模式&#xff0c;而AI Agent的兴起正推动教育从标准化供给转向个性化协同时代。AI Agent不再仅是知识检索工具或自动…...

【Lovable开发避坑红宝书】:17个被大厂隐藏的移动端情感设计陷阱及修复代码模板

更多请点击&#xff1a; https://intelliparadigm.com 第一章&#xff1a;Lovable移动端情感设计的底层认知与价值重定义 Lovable移动端情感设计并非界面动效或拟物图标的技术叠加&#xff0c;而是以人类情绪反馈回路为锚点&#xff0c;重构交互系统底层逻辑的设计范式。它要求…...

2026年企业级AI矩阵系统技术演进:从“群控分发“到“智能增长中台“的架构跃迁

摘要&#xff1a;当矩阵运营从"人海战术"迈入"AI全域中台"时代&#xff0c;底层技术架构成为决定系统天花板的核心变量。本文从算力调度、混合云部署、素材智能治理三个技术维度&#xff0c;拆解当前企业级AI矩阵系统的演进路径&#xff0c;并以星链引擎&a…...