当我尝试在 Mac 上的 Andriod Studio 上运行该项目时,出现如下内部错误:
Andriod Emulator closed because of an internal error:
emuglConfig_init: blaclisted=0 has_guest_renderer=1
emuglConfig_init: auto-selected host based on conditions and UI preference 0
Deciding if GLDirectMem/Vulkan should be enabled.
Selected renderer: 1API level: 27 host GPU blacklisted?1
Host GPU selected, not enabling Vulkan because either API level is
Not enabling Vulkan here(Feature flag may be turned on manually)
Run Code Online (Sandbox Code Playgroud)
请查看随附的错误屏幕截图以获取更多详细信息:
我目前正在处理另一个人项目的一些 Findbugs 问题。
这是我正在处理的问题:
正确性 - 类定义了屏蔽超类字段的字段
该类定义了一个与超类中的可见实例字段同名的字段。这是令人困惑的,如果方法在需要另一个字段时更新或访问其中一个字段,则可能表示错误。
有超类OutputInterface和CoreOutputInterface扩展的子类OutputInterface。他们都定义了变量className。
CoreOutputInterface也有一些子类。
为了解决这个问题,我只需className从子类 ( CoreOutputInterface) 中删除 ,因为它已经在超类中定义了。
变量永远不会用super.classNameor读取或设置this.className,只有用className,所以在我看来它不应该导致任何问题。
此外,整个项目中从未引用超类中的变量(我使用 Eclipse 引用函数检查了它)。
谁能确认这在任何情况下都不会导致问题?
在此先感谢您的帮助。
输出接口:
public abstract class OutputInterface {
protected String className = null;
...
}
Run Code Online (Sandbox Code Playgroud)
核心输出接口:
public abstract class CoreOutputInterface extends OutputInterface {
protected String className = null;
...
public void getClassName() {
return className;
}
public void setClassName(String newName) {
className = …Run Code Online (Sandbox Code Playgroud)