jcw*_*jcw 3 android constructor android-context
我用以下构造函数编写了一个类
public CustomDialog(Context context)
Run Code Online (Sandbox Code Playgroud)
但是当我尝试在我的活动中这样做时
CustomDialog diag = new CustomDialog(getApplicationContext()){/*stuff here*/};
Run Code Online (Sandbox Code Playgroud)
我收到了错误 The constructor CustomDialog(Context) refers to the missing type Context
这是什么意思?我该如何解决?
如果其他人有这个问题:我遇到了一些从Play许可库中调用方法的代码的问题.我使用Project> Clean on Play Licensing项目修复了它(而不是显示错误的项目).
这是什么意思?
AFAIK,或者:
你错过了import android.content.Context,或
您的项目搞砸了,编译器无法android.content.Context在您的构建路径中找到