在运行我的应用程序(GoogleMaps)获取Android库项目时无法启动?我该如何解决这个?
我的代码是:
mMap = ((MapFragment)getFragmentManager().findFragmentById(R.id.map)).getMap();
它给出了错误 MapFragment cannot be resolved as a type
如何克服此错误?
尝试将Google-Services_lib从您的Android SDK导入到您当前的Eclipse
lib的路径在
中adt-bundle-windows-x86-20131030sdkextrasgooglegoogle_play_serviceslibprojectgoogle-play-services_lib
遵循的步骤
*In the Package Explorer, right-click the library project and select Properties.
*In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
*Select the "google-play-services_lib" checkbox and click Apply.
*Click OK to close the Properties window.
然后,地图将正常工作