gpt4 book ai didi

android - import com.google.android.gms.location.LocationClient无法解析

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:37:15 27 4
gpt4 key购买 nike

<分区>

我遇到了这个编译错误。我在同一工作区中添加了 google play 服务库。然后成功添加了最新的 sdk(tools,extras)。

但不知道为什么还是会出现这个错误。

import com.google.android.gms.location.LocationClient;  -->import cannot be resolved


public class Main extends Activity implements
GooglePlayServicesClient.ConnectionCallbacks,
GooglePlayServicesClient.OnConnectionFailedListener {

private LocationClient mLocationClient; --->LocationClient cannot be resolved to a type


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

mLocationClient = new LocationClient(this, this, this);

}
}

控制台中:

我明白了,找不到与给定名称匹配的资源(在“值”处,值为“@integer/google_play_services_version”)。

list :

 <uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="21" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />

........
</application>

编辑:

enter image description here

enter image description here

任何人都可以帮我解决这个问题。谢谢。

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com