max
max

Reputation: 6177

package com.google.android.maps does not exist "osmdroid" Android Studio

Hi I know this question asked a lot but none of them help me to fix my problem.
I simply want to import this Project to my android Studio but I give this error message

Error:(15, 39) error: package com.google.android.maps does not exist

and this is my SDK:

enter image description here

I try clean , rebuild , invalidate cache but none of them help me.

Upvotes: 2

Views: 890

Answers (2)

spy
spy

Reputation: 3258

osmdroid contributor here.

osmdroid-android, which is the primary map engine does not require google play services. osmdroid-thirdparty does need since it provides a wrapper for using gmaps with osmdroid apis

if you're building for source: osmdroid can be built with maven (which currently has issue with play services) and gradle. suggest you use gradle with android studio

otherwise use this

dependencies { compile 'org.osmdroid:osmdroid-thirdparty:5.0.1@aar' }

Upvotes: 1

Mars Moon
Mars Moon

Reputation: 114

I dont think osmdroid does need googlemaps library. But anyway, have you tried adding google-play-services library to build.gradle?

If you havent you can do this by following steps

  • Click on Project Structure
  • Go to Dependencies Tab
  • Click + button
  • Select com.google.android.gms:play-services and click ok
  • Rebuild the project

Upvotes: 0

Related Questions