OnMapReadyCallback无法解析为类型 [英] OnMapReadyCallback cannot be resolved to a type
问题描述
我是Android应用内的Google地图的新手,我试图测试包含在文档中的示例:
您需要创建并API项目并获取API密钥以便与地图一起工作。
更新:
可能您的版本较旧的支持库,所以删除当前并导入最后一个,你可以在你的项目中使用.jar(位于: sdk\extras\android\support\v7
),或者您可以导入位于以下位置的库项目:
sdk\extras\android\support\v7\appcompat
。
I'm new to Google Maps inside an Android app and I'm trying to test the example that is included in the documentation: https://developers.google.com/maps/documentation/android/
I did some research and apparently this was included in the latest Google Play Services package. I really think I have the last one, but I still cannot resolve OnMapReadyCallback. This is how it looks:
Does anybody know what I could be missing?
Thanks
Probably you need to change to Google APIs, go to properties
-> Android
.
So you will solve the problem implementing the class OnMapReadyCallback
:
import com.google.android.gms.maps.OnMapReadyCallback;
public class MapPane extends Activity implements OnMapReadyCallback {
You need to read all the info related to Google Maps Android API V2:
You need to create and API project and get the API key to work with Maps.
UPDATE:
probably you have an older version of the support library, so delete the current and import the last one, you can use the .jar in your project (located in: sdk\extras\android\support\v7
) or you can import the library project located in:
sdk\extras\android\support\v7\appcompat
.
这篇关于OnMapReadyCallback无法解析为类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!