Cannot import com.google. … why?

前端 未结 2 1081
遥遥无期
遥遥无期 2021-01-25 14:08

I am simply trying to compile and run the example project from: http://developer.android.com/training/location/geofencing.html

I get the following errors:

packag

相关标签:
2条回答
  • 2021-01-25 14:15

    You need to add the Android Support library to your project.

    http://developer.android.com/tools/support-library/setup.html

    "In order to use a Support Library, you must modify your application's project's classpath dependencies within your development environment."

    0 讨论(0)
  • 2021-01-25 14:23

    Please find below Steps to need to follow after downloading it:

    1. Right Click on your Project Explorer.

    2. Select New-> Project -> Android Application Project from Existing Code

    3. Browse upto this path only - "C:\Users*your path*\Local\Android\android-sdk\extras\google\google_play_services"

    4. This will add google play service project into eclipse

    5. Now, Right click on your project (not google play service project) and select "Java Build path".

    6. Select Libraries Tab and click on "Add Jars" button. Locate google_play_service project(NOTE: google play service project should not be closed in pkg explorer window) and add libraries from lib folder and click ok.

    7. (if still not appearing libs then follow this steps) Again right click on your project, select properties and select "Android" option.

    8. From left panel, select "Android" option.

    9. Under "Library" section, you will see "Add" button. Click on that button and locate "google-play-services_lib".

    10. Then click on Apply. It will be added to your project. :)

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