Android The import com.google cannot be resolved

前端 未结 14 1446
猫巷女王i
猫巷女王i 2020-12-09 04:41

I\'m trying to test LocationService example of Android developer as per following link http://developer.android.com/training/location/retrieve-current.html. At that time, er

相关标签:
14条回答
  • 2020-12-09 05:18

    There is a much simpler solution. In my case, I've gone through all the answers from a few sources and none of them give a straight answer to my problem. Finally, I found a sample app source code and when I import the source code I found out adding the library from Google Play Service Library directory solved it. Google Play Service Library is located (for windows user) here:

        \sdk\extras\google\google_play_services\libproject
    

    Import the library into Eclipse as a library project and add this library in your actual project will fix it.

    EDIT: This guy made a great contribution on his tutorials how to use Android Google Map v2 step by step and very details. It also includes how to use with Android Support package’s backport of fragments.

        http://ddewaele.github.io/GoogleMapsV2WithActionBarSherlock/part1
    
    0 讨论(0)
  • 2020-12-09 05:20

    set your project properties to google api.

    0 讨论(0)
  • 2020-12-09 05:20

    If you're using Android Studio:

    Right click on your app folder -> Open Module Settings -> Dependencies -> Click on the plus button -> Choose library dependency -> Search for "play-services" -> Double click on the com.google.android.gms:play-services

    Press Ok and wait for Gradle to rebuild.

    0 讨论(0)
  • 2020-12-09 05:21

    Assuming you use Eclipse.
    Right-click on your project -> properties -> Android.
    There use Google API's instead of standard Android.

    0 讨论(0)
  • 2020-12-09 05:22

    It Works = Do you use android sdk with google api? If not, do that and it will work.

    0 讨论(0)
  • 2020-12-09 05:25

    Do you use android sdk with google api? If not, do that and it will work.

    0 讨论(0)
提交回复
热议问题