导入com.google.android.maps.geopoint无法解析
我有Java GoogleMAP项目。这不是android项目。 我之前使用KML完成了这个项目。 现在谷歌已经改为JSON / XML。 我需要在数据库-postgresql中的2个位置保存坐标。 然后我会在MAP中绘制路径。
现在问题是: GeoPoint cannot be resolved to a type
。 我这样导入也import com.google.maps.GeoPoint;
。 这也显示为红色标记。 请让我知道什么是问题或问题?
我谷歌吧。 没运气。 所有提到有关Android谷歌api设置。
不是android项目……
请帮我..
提前致谢。
转到项目属性,然后转到Android。 选择“Google API”而不是Android xx它对我有用,理想情况下应该也适合你。
完全适合我的项目属性> android>平台>谷歌API 10
和清洁:)。首先使用SDK Manager下载您需要的Google API版本!
您需要使用Google API编译项目。
- 安装Google API SDK
- 使用Google API编译项目项目
- 您需要将Google API附加组件添加到项目中。 请参阅此文档: https : //developers.google.com/android/add-ons/google-apis/installing
确保您在应用程序标记内的manifest
文件中定义了以下行:
您需要在lib和classpath中添加所需的jar。 由于这些jar不在类路径中,因此您的IDE无法解析您尝试导入的类的位置。
我解决了“使用Gradle文件同步项目”。
您需要将Google API附加组件添加到项目中。 请参阅此文档: https : //developers.google.com/android/add-ons/google-apis/installing
就这样。