首页 > 解决方案 > “Emulator: FramebufferData::restore: warning: a texture is deleted without unbinding FBO”是什么意思,我该如何解决这个问题?

问题描述

我只是想运行我的应用程序,每次运行它时,它都会给我这个消息并且它会停止运行应用程序。AVD 保持打开状态,我可以看到典型的 android 主屏幕,但我的应用程序根本无法运行。Gradle 构建完成并正确构建,但我的应用程序仍然无法打开。

公共类 MainActivity 扩展 AppCompatActivity {

String [] states = {"Alabama","Alaska","Arizona","Arkansas", "the rest of the US states"};

String storage = "";
Double stormCount = 0.0;
int yearChoice;
double xval = yearChoice - 1950;

Spinner stateSpinner;
EditText yearInput;
TextView networkResults;

@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    stateSpinner = findViewById(R.id.stateSpinner);
    ArrayAdapter <String> adapter;
    yearInput = findViewById(R.id.yearInput);
    networkResults = findViewById(R.id.networkResults);

    adapter = new ArrayAdapter<>(this,android.R.layout.simple_list_item_1,states);
    stateSpinner.setAdapter(adapter);

    yearChoice = Integer.valueOf(yearInput.getText().toString());

    stateSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
        @Override
        public void onItemSelected(AdapterView<?> adapterView, View view, int position, long l) {

            if(position == 0) {
                stormCount = 14.5160471387124 * Math.pow(Math.E, .0742980947989195 * xval);
                storage = "The amount of storms in "+states[position]+" in "+yearChoice+" is "+Math.floor(stormCount)+". This reading is about 70% accurate.";
            }

            if(position == 1) {
                storage = ("Sorry, data from your region currently has too low an accuracy rate to be used");
            }

            if(position == 2) {
                stormCount = (.000000293212037634147 * Math.pow(xval, 6)) - (.0000642428907817738 * Math.pow(xval, 5)) + (.00526808502644371 * Math.pow(xval, 4))
                        - (.195157071357244 * Math.pow(xval, 3)) + (3.27415865786315 * Math.pow(xval, 2)) - (20.6557307408656 * xval) + 35.8205191551242;
                storage = ("The amount of storms in "+states[position]+" in "+yearChoice+" is "+Math.floor(stormCount)+". This reading is about 70% accurate.");
            }

----数组中每个元素的更多 IF 语句----

        }

        @Override
        public void onNothingSelected(AdapterView<?> adapterView) {

        }
    });

}

public void submitButtonClicked(View v) {
    networkResults.setText(storage);
}

标签: javaandroid-studio

解决方案


这是一个特定的模拟器问题,而不是您的应用程序。尝试干净启动您的虚拟设备:AVD 设备管理器,选择您的模拟器,点击操作 > 擦除数据并重新开始。祝你今天过得愉快。


推荐阅读