我正在关注本教程: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
但教程并没有要求做任何这些,但仍然出现错误..
答案 0 :(得分:0)
根据日志,您似乎没有正确连接Google地图。 This video展示了如何使用Google Map Android Api v1开始示例,现在示例使用Api v2,因此您应该将google play服务连接到您的项目。
这是tuturial