Crishnan Crishnan - 1 year ago 81
Android Question

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. What should i do now ?

Intent viewIntent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);

Answer Source

Try this..

I guess your import is wrong


import android.provider.Settings;

Or try like below.

Intent viewIntent = new Intent(android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS);