android :运行mock location demo时出错 import com.google.android.gms.*

上一篇 / 下一篇  2014-07-11 13:57:55 / 个人分类:android

http://developer.android.com/training/location/location-testing.html

下载sample运行时出错:
Type ConnectionCallbacks cannot be resolved to a typeSendMockLocationService.java

import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks;
import com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener;
import com.google.android.gms.location.LocationClient;

解决方法:
少了google-play-services_lib

1:Eclipse -> import -> existing android code -> browse -> navigate to google-play-services_lib FOLDER (android-sdk/extras/google/google_play_services/libproject).如下图所示

2:on your project, control click -> properties -> android -> libraries, add -> select the project“google-play-services_lib” -> ok

3:run


TAG:

 

评分:0

我来说两句

Open Toolbar