Task appcompileDebugJavaWithJavacstorageemulated0AndroidIDEProjectsヤᄏ¦ᄌヨユフ¦ᄌヒ│ᄑᄑ│ᆵᄏ¥マヨ│ᄒモ¥ナᆬ₩ᄀニappsrcmainjavacomhsjdowgancmMainActivityjava85 error cannot find symbol new MaterialAlertDialogB
The error message indicates that the compiler cannot find the symbol "MaterialAlertDialogBuilder" in the MainActivity class.
To resolve this issue, you need to make sure you have imported the correct package for the MaterialAlertDialogBuilder class. The import statement should look like this:
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
Make sure you have also added the necessary dependency in your build.gradle file:
implementation 'com.google.android.material:material:1.3.0'
After making these changes, rebuild your project and the error should be resolved.
原文地址: https://www.cveoy.top/t/topic/jaIH 著作权归作者所有。请勿转载和采集!