MapActivity cannot be resolved to a type, even for the purpose of the Google API

I also get "com.google import cannot be resolved to type" and I'm not sure if this is related, but my project works fine on Android 2.3.3, but freezes when running in Google API 2.3.3 and 4.0.

ps i turned on

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

Please, help! thanks

+6
source share
2 answers

You need to specify the correct library at compile time. But what you are describing requires Android to use this particular library at runtime.

You need to right-click the Eclipse project, Properties -> Android. In Project Build Target select any target with a Google Inc. provider Google Inc. .

+17
source

The problem is that you are not using Google Api for a specific Android platform. Simply trimming the appropriate Google target API will solve the problem.

enter image description here

+1
source

Source: https://habr.com/ru/post/903638/


All Articles