2017-10-07 19 views
-4

爲什麼錯誤mGoogleApiClient? 這是我的gradle產出:無法解析mGoogleApiClient

compile 'com.android.support:appcompat-v7:26.+' 
compile 'com.google.android.gms:play-services-maps:11.0.4' 
compile 'com.google.android.gms:play-services-location:11.0.4' 
testCompile 'junit:junit:4.12' 

,這我的源代碼:

@Override 
public void onConnected(@Nullable Bundle bundle) { 
    LocationRequest mLocationRequest = new LocationRequest(); 
    mLocationRequest.setInterval(1000); 
    mLocationRequest.setFastestInterval(1000); 
    mLocationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY); 
    if (ContextCompat.checkSelfPermission(this, 
      android.Manifest.permission.ACCESS_FINE_LOCATION) 
      == PackageManager.PERMISSION_GRANTED) { 
     LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this); 
    } 
} 
+0

顯示你的整個gradle這個app文件 –

回答