Cannot Resolve Mapactivity Class on Android

Cannot resolve MapActivity class on Android

Apparently at some point my build environment got really messed up. It looked like I somehow had the google APIs jar in my project twice, causing a conflict. I deleted the project and recreated it, works now.

Android studio cannot resolve mapActivity

it cannot resolve MapActivity

MapActivity is from the old, defunct MapsV1 way of integrating Google Maps. Since you cannot get API keys for MapsV1 anymore, you will need to modify your code to use MapsV2.

This also does not speak well for that service, as to how much they are paying attention to their Android code generation, given that MapsV1 was deprecated 1.5 years ago.

MapActivity class in android?

You probably haven't done the steps required to set up a Maps project as described in Maps External API Overview. There is no maps.jar to add. Read the document I linked to, and you should be all set.

MapActivity cannot be resolved to a type

Google API is a third party SDK. Choose third party in packages manager.

MapActivity could not be found. Android Studio 0.5.1

MapActivity was part of the Google Maps Android v1 API which is now deprecated.

Using the Google Play Services library you will use the Google Maps Android API v2 and then MapActivity is not available anymore. You need to use the MapFragment.

You can see an introduction on how to use the MapFragment in the official documentation.

Cannot resolve symbol 'OnMapReadyCallback'

Open your build.gradle app and paste this code:

implementation 'com.google.android.gms:play-services-maps:15.0.1'

android mapView not resolved

Add this in Your menifest

<uses-library android:name="com.google.android.maps"/>

in your layout

<com.google.android.maps.MapView
android:id="@+id/mv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="---- Your Key -------"
/>

You have a sily mistake. Move your setContentView above the declairation of the MapView. For that reason it gettting that error

super.onCreate(savedInstanceState);
setContentView(R.layout.activity_map);

MapView mapView = (MapView) findViewById(R.id.mv);


Related Topics



Leave a reply



Submit