Quickblox 位置示例不起作用
Posted
技术标签:
【中文标题】Quickblox 位置示例不起作用【英文标题】:Quickblox location sample not working 【发布时间】:2014-04-04 08:20:34 【问题描述】:我正在关注本教程:https://www.youtube.com/watch?v=ERVi5bKhqeI 此示例在 linux mint 16 上:http://quickblox.com/developers/SimpleSample-location_users-android 但是我遇到了很多我无法修复的错误:
Description Resource Path Location Type
LatLng cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 91 Java Problem
MarkerOptions cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 90 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 95 Java Problem
BitmapDescriptorFactory cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 92 Java Problem
The constructor AlertDialog.Builder(MapActivity) is undefined MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 110 Java Problem
The constructor AlertDialog.Builder(MapActivity) is undefined MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 98 Java Problem
The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (MapActivity, String, int) MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 132 Java Problem
The constructor EditText(MapActivity) is undefined MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 116 Java Problem
The method setContentView(int) is undefined for the type MapActivity MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 59 Java Problem
FragmentActivity cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 58 Java Problem
The method getBaseContext() is undefined for the type MapActivity MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 62 Java Problem
GooglePlayServicesUtil cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 62 Java Problem
GooglePlayServicesUtil cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 67 Java Problem
ConnectionResult cannot be resolved to a variable MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 65 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 90 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 90 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 23 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 24 Java Problem
FragmentActivity cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 49 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 51 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 53 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 53 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 54 Java Problem
The method onCreate(Bundle) of type MapActivity must override or implement a supertype method MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 57 Java Problem
The import android.support cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 11 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 16 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 17 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 18 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 19 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 20 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 21 Java Problem
The import com.google.android.gms cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 22 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 205 Java Problem
CameraUpdateFactory cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 203 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 199 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 198 Java Problem
LatLng cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 196 Java Problem
LatLng cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 196 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 203 Java Problem
BitmapDescriptorFactory cannot be resolved MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 201 Java Problem
MarkerOptions cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 199 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 199 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 159 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 161 Java Problem
GoogleMap cannot be resolved to a variable MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 158 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 159 Java Problem
The method makeText(Context, CharSequence, int) in the type Toast is not applicable for the arguments (MapActivity, String, int) MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 170 Java Problem
LOCATION_SERVICE cannot be resolved to a variable MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 180 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 163 Java Problem
Marker cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 166 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 156 Java Problem
SupportMapFragment cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 156 Java Problem
The constructor AlertDialog.Builder(MapActivity) is undefined MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 135 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 155 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 157 Java Problem
GoogleMap cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 158 Java Problem
SupportMapFragment cannot be resolved to a type MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 156 Java Problem
The method getSupportFragmentManager() is undefined for the type MapActivity MapActivity.java /LocSample/src/com/quickblox/sample/location/activities line 156 Java Problem
我确实在属性中添加了 quickblox-android-1.1.jar 文件并尝试使用以下方法修复它们:MapActivity cannot be resolved to a type, even with Google API target 但是本教程并没有要求做任何这些,但仍然出现错误..
【问题讨论】:
【参考方案1】:根据日志,您似乎没有正确连接 Google 地图。 This video 展示了如何使用 Google Map Android Api v1 启动示例,现在示例使用 Api v2,因此您应该将 google play 服务连接到您的项目。
这里是tuturial
【讨论】:
以上是关于Quickblox 位置示例不起作用的主要内容,如果未能解决你的问题,请参考以下文章