[英]ACTION_LOCATION_SOURCE_SETTINGS : cannot be resolved or is not a field
I'm calling ACTION_LOCATION_SOURCE_SETTINGS via Intent.its is showing cannot be resolved or is not a field caused while importing Project from outside. 我正在通过Intent调用ACTION_LOCATION_SOURCE_SETTINGS。它表示无法解决,或者不是从外部导入Project时引起的字段。 What should i do now ?
我现在应该怎么办 ?
Intent viewIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(viewIntent);
Try this.. 尝试这个..
I guess your import is wrong 我想你的进口错了
Use 采用
import android.provider.Settings;
Or try like below. 或尝试如下。
Intent viewIntent = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(viewIntent);
在Eclipse中检查项目的属性,选择“ Android”并检查目标名称为“ Android 6.0”或+
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.