問題描述
我正在嘗試按照以下鏈接測試 Android 開發人員的 LocationService 示例 http://developer.android.com/training/location/retrieve-current.html.當時,錯誤消息顯示無法解析導入 com.google "以下 5 行.我真的很困惑如何解決這個問題.
I'm trying to test LocationService example of Android developer as per following link http://developer.android.com/training/location/retrieve-current.html. At that time, error message show me that "The import com.google cannot be resolved" for following 5 lines. I'm really confused how to solve this problem.
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GooglePlayServicesClient;
import com.google.android.gms.common.GooglePlayServicesUtil;
import com.google.android.gms.location.LocationClient;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
推薦答案
您需要在 Eclipse 中配置 Google Play 服務 SDK 并導入 google play 服務,因為庫將消除此錯誤.
You will need the Google Play Services SDK configured within Eclipse and import google play services as library will dismiss this error .
這篇關于Android 導入com.google 無法解決的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!