3

i cannot import GeoPoint, please help me....

import com.google.android.maps.GeoPoint;

public class MainActivity extends Activity {

/** Called when the activity is first created. */
TextView text;
GeoPoint startGP;
GeoPoint startGP1;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    text = (TextView)findViewById(R.id.text);
    GeoPoint startGP12 = new GeoPoint(
            (int) (11.66924 * 1E6),
            (int) (78.139497 * 1E6));
  • 1
    Please check this http://stackoverflow.com/questions/25302022/cannot-resolve-symbol-android-on-android-studio – Raghavendra May 26 '16 at 09:39

2 Answers2

2

The Google API has updated and now uses LatLng instead of GeoPoints, you can replace your code with the following

    LatLng startGP12 = new LatLng(
        (int) (11.66924 * 1E6),
        (int) (78.139497 * 1E6));
Emir Kuljanin
  • 23
  • 1
  • 1
  • 7
0

make sure you have defined at your manifest file inside application tag the following line:

<uses-library android:name="com.google.android.maps"/>
slimoss
  • 33
  • 1
  • 4