简体   繁体   中英

import com.google.android.maps.geopoint cannot be resolved

I have Java GoogleMAP project.This is not android project. I have done this project previous using KML. Now Google has changed to JSON/XML. I need to save coordinates within 2 location in database -postgresql. Then accroding to that i will draw the path in MAP.

Now the problem is : GeoPoint cannot be resolved to a type . I import like this also import com.google.maps.GeoPoint; . This also show as red mark. Please let me know what is an issues or problem?

I google it. No luck. All are mention about android google api setup.

Not an android project...

please help me..

Thanks in advance.

Go to project properties, and go to Android. Select "Google API" instead of Android xx It works for me and ideally should work for you too.

exactly works fine for me project properties > android > platform > Google API 10

and Clean :) .First download the Google API version you require using SDK Manager!

You need to compile your project with Google APIs.

  1. install Google APIs SDK

在此输入图像描述

  1. Compile the project project with Google APIs

在此输入图像描述

  1. You need to add the Google APIs Add-On to your project. See this document: https://developers.google.com/android/add-ons/google-apis/installing

确保您已在应用程序标记内的manifest文件中定义了以下行:

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

You need to add required jars in lib and classpath. Because those jars are not in classpath your IDE couldn't resolve the location of the class you are trying to import.

我解决了“使用Gradle文件同步项目”。

You need to add the Google APIs Add-On to your project. See this document: https://developers.google.com/android/add-ons/google-apis/installing

That's all.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM