无法重命名资源(布局)文件(已安装 Android Studio 3.0 Beta 3) [英] Can't rename resource (layout) files (Android Studio 3.0 Beta 3 is installed)

查看:31
本文介绍了无法重命名资源(布局)文件(已安装 Android Studio 3.0 Beta 3)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Beta 3 不允许重命名资源文件,例如布局文件.它确实显示了重命名对话框,但是在尝试应用更改时,它会读取以下错误消息:

无法进行重构文件 .../myapplication/R.java 是只读的

此外,我在邻居目录中有 Beta 2 版本,重命名效果很好.任何想法如何解决这个问题?

UPD:我报告了这个错误 (#65079508),现在它被标记为 65032914

Beta 3 doesn't allow to rename resource files such as layout files. It does show the renaming dialog, but when trying to apply changes it reads the following error message:

Refactoring cannot be performed
File .../myapplication/R.java is read-only

Also I have Beta 2 version in a neighbor directory and renaming works perfect. Any ideas how to fix that?

UPD: I reported the bug (#65079508), and now it is marked as a duplicate of 65032914 https://issuetracker.google.com/issues/65032914

So, the issue is even wider and if I understand it well the bug will be fixed in some coming version of the Studio.

UPD#2: Beta 4 is released. The bug is still not fixed.

UPD#3 Fixed in Beta 5.

解决方案

meh, just get rid of the generated files && then refactor.

Gradle --> app --> build --> clean.

这篇关于无法重命名资源(布局)文件(已安装 Android Studio 3.0 Beta 3)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆