简体   繁体   English

导入ProgressDialog类的问题

[英]Problems to import ProgressDialog class

I want to use ProgressDialog in a project, but I can not import that class into my MainActivity.java .我想在项目中使用ProgressDialog ,但我无法将该类导入到我的MainActivity.java

When I try to write import android.app.ProgressDialog;当我尝试编写import android.app.ProgressDialog; the line of code gets hidden.代码行被隐藏。

This problem occurs in all projects, even a new and empty project.这个问题出现在所有项目中,即使是一个新的空项目。

MainActivity.java 主活动.java

app.gradle 应用程序.gradle

the error I got 我得到的错误

I don't see anything wrong in your project settings from the screenshots you attached.从您附加的屏幕截图中,我没有发现您的项目设置有任何问题。 I would suggest you to try Invalidate Cache / Restart from the File menu.我建议您从“文件”菜单尝试“ Invalidate Cache / Restart ”。

在此处输入图片说明

The problem was solved.问题解决了。

I deleted the android studio and also我删除了android studio ,也删除了

(important -->) (重要-->)

deleted the gradle folder and the android studio 3.2 folder and reinstalled android studio .删除gradle文件夹和android studio 3.2文件夹并重新安装android studio

Finally my problem was resolved.最后我的问题解决了。

Screenshot for gradle & androidstudio folders gradle 和 androidstudio 文件夹的屏幕截图

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM