搜索
您的当前位置:首页正文

Android中出现android.content.res.Resources$NotFoundException: Resource ID #0x0问题

来源:星星旅游

参考:博客,解决了我的问题,在这里记录一下。

private void showDialogCustom(){
        AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);
        builder.setTitle("选择:");
        builder.setItems(mCustomItems, new DialogInterface.OnClickListener() {
            ...

上述代码中引入的AlertDialog包名错误,应该引入import android.app.AlertDialog;

因篇幅问题不能全部显示,请点此查看更多更全内容

Top