问题
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. What should i do now ?
Intent viewIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);
startActivity(viewIntent);
回答1:
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);
回答2:
In Eclipse check properties of your project, select 'Android' and check target name is 'Android 6.0' or +
来源:https://stackoverflow.com/questions/22004989/action-location-source-settings-cannot-be-resolved-or-is-not-a-field