问题标签 [android-studio-4.1]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
240 浏览

android - 如何在 Android Studio 中查看我使用的方法?

过去(通过 Android Studio 4.1,IIRC)在编辑文件时,您可以看到光标所在的方法(和/或类等)的名称,显示在该行附近的状态栏中/ 列号。当方法的开头不在屏幕顶部某处时,这非常有用,因此您不必向上滚动一两页即可找到它,失去您的位置,然后向下滚动。

现在,在 Android Studio 4.2 中,我看不到这个。我仍然在状态栏中看到列/行号(显示在右下角),如果您右键单击那里,您可以切换多个项目的显示。但是当前方法的名称不是选项之一。

我已经尝试过“结构”窗格,虽然它确实列出了我正在编辑的类中的方法,但它并不表示当前方法。(如果我不需要的话,我也不想分配这么多的空间来查看方法名称。)

我也尝试搜索 Android Studio 帮助,但无济于事。这个功能消失了吗?如果没有,我在哪里可以再次找到它?

0 投票
0 回答
261 浏览

flutter - Android Studio 在编辑大型多部分 dart 文件时内存不足

编辑大型多部分 dart 文件时,android-studio 4.1 和 4.0 内存不足。

到目前为止没有运气

  • 使缓存/重启无效。
  • 重构飞镖文件

当前设置

  • IDE最大堆边:4096
  • AS-4.1 上的 Flutter 插件版本是 51.0.2
  • AS-4.1 上的 Dart 插件版本是 201.9245

以前,当堆大小设置为 3096MB 堆大小设置为 3096

0 投票
0 回答
337 浏览

android-studio - Android Studio 不再记得“生成签名包或 APK”中的密码 (4.1)

本周我使用 Android Studio 构建了 3-4 次发布包,我总是检查“记住密码”。

但是每次我做一个新的发布版本时,它都会要求输入密码,所以“记住密码”被忽略,只记住“密钥存储路径”和“密钥别名”字段。

它在一段时间前工作,但现在它没有。4.1版的mb bug,我不知道。

有人有这个问题吗?能解决吗?

在此处输入图像描述

更新它会重置所有项目的密码,并仅保留用于构建发布包/apk 的最后一个项目

0 投票
0 回答
353 浏览

android - Android Studio 4.1 在 Ubuntu 20.04.1 LTS 中启动失败

运行(Thread.java:748)2020-11-09 23:09:41,540 [3217] 错误 - llij.ide.plugins.PluginManager - Android Studio 4.1 Build #AI-201.8743.12.41.6858069 2020-11-09 23: 09:41,540 [3217] 错误-llij.ide.plugins.PluginManager-JDK:1.8.0_242-release;虚拟机:OpenJDK 64 位服务器虚拟机;供应商:JetBrains sro 2020-11-09 23:09:41,540 [3217] 错误 - llij.ide.plugins.PluginManager - 操作系统:Linux

安装损坏:缺少必要的插件:

org.jetbrains.android

请从头开始重新安装 Android Studio。

0 投票
1 回答
434 浏览

android - 当我在 Windows 10 中将 android studio 从 4.1 更新到 4.1.1 时

在 Windows 10 中将 android studio 从 4.1 版更新到 4.1.1 版时出现此错误。我从任务管理器关闭了 android studio 并以管理员身份运行 android studio 但同样的错误。

以下错误输出位于 C:\Users%User%\AppData\Local\Google\AndroidStudio4.1\log\idea_updater.txt

0 投票
1 回答
690 浏览

android-studio-4.1 - Android Studio 4 构建错误:任务“:app:mergeDebugResources”执行失败

您好这是我第一次制作android程序并发现此错误但代码没有错误点。错误信息如下:

任务 ':app:mergeDebugResources' 执行失败。

无法解析配置“:app:_internal_aapt2_binary”的所有文件。无法转换 aapt2-4.1.1-6503028-windows.jar (com.android.tools.build:aapt2:4.1.1-6503028) 以匹配属性 {artifactType=_internal-android-aapt2-binary, org.gradle.libraryelements =jar,org.gradle.status=release,org.gradle.usage=java-runtime}。> Aapt2Extractor 执行失败:C:\Users\lenovo.gradle\caches\modules-2\files-2.1\com.android.tools.build\aapt2\4.1.1-6503028\cc838ebadee3649d47e07d029371bc1054e2200d\aapt2-4.1.1-6503028 -windows.jar。> java.io.IOException: Unable to delete directory 'C:\Users\lenovo.gradle\caches\transforms-2\files-2.1\aa8b5888abc00f78a9403248465821cc' 无法删除一些子目录。这可能是因为进程打开了文件或将其工作目录设置在目标目录中。- C:\用户\联想。

有人可以告诉我如何解决吗?

0 投票
1 回答
180 浏览

android - 尝试在 Android Studio 中运行时出现 AVD 错误

为什么我可以将我的 avd 作为单独的窗口运行,但不能在 android studio 的应用程序中运行?我正在运行所有内容的最新版本。 这是我的 avd 作为独立应用程序的图片。

这是当我尝试在 android studio 中使用 avd 运行控制台时打印出来的内容。

请帮我。

0 投票
1 回答
484 浏览

macos - Dialogs are displayed as tabs in Android Studio IDE then the IDE becomes unresponsive

I am having a problem with Android Studio 4.1 where particular things that should show up as dialogs(like tip of the day or an update dialog) are displayed as fullscreen tabs and then Android Studio becomes unresponsive, CPU usage goes through the roof and the fan kicks in almost immediately, and I have to force it to quit.

This is happening on Mac and I recently updated to macOs Big Sur but everything was working fine until 2 days ago when this started happening so I don't if I hit some key combination to make this happen or something else is wrong.

I deleted and reinstalled Android Studio but the problem still persists. Below is a screenshot of this happening when I had just got an alert about a Gradle Update and I clicked on update.

EDIT

On trying to find out further what the problem could be, this only occurs when the Android Studio window is in maximised/fullscreen mode

enter image description here

0 投票
1 回答
678 浏览

android - Android 模拟器的问题不再在 mac os high sirrra 10.13.6 上启动

我有一台 2011 年末的 Mac,配备 2.5 GHz Intel Core i5、AMD Radeon HD 6750M 512 MB 和 12 GB 内存。过去从 Android Studio 启动 android 模拟器没有问题。但是,更新到 Android Studio 4.1.1 后,模拟器不再启动。它看起来像是要启动但是它崩溃了,我收到一个看起来像这样的错误报告: Android Emulator Error

我不知道该怎么做。我已经卸载并重新安装了 intel haxm,启动和停止它,尝试使用终端启动 android 模拟器,卸载并重新安装模拟器,擦除我的硬盘并重新安装 mac os high sierra(我的计算机的最新版本),但仍然没有. 它不再与我的计算机兼容了吗?

0 投票
6 回答
8490 浏览

android-studio - viewBinding 无法正常工作并出现错误(Android Studio 4)

我用 Android studio 4 (4.11) 的 kotlin 制作了 android 应用程序。

findViewById 在 Androd Studio 4 中已弃用,然后我使用 viewBinding。 https://developer.android.com/topic/libraries/view-binding

但是 viewBinding 没有出现错误。

有人可以告诉我错误或我的错误的原因吗?

代码如下。

构建等级:

资源/布局/activity_main.xml: