googleApiClient.Builder(this)不存在

时间:2018-05-30 22:59:49

标签: android

@Override
public void onMapReady(GoogleMap googleMap) {
    mMap = googleMap;

    // Add a marker in Sydney and move the camera
    LatLng sydney = new LatLng(-34, 151);
    mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
    buildgoogleclient();
    if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {

        return;
    }

    mMap.setMyLocationEnabled(true);
protected synchronized void buildgoogleclient() {
    mgoogleApiClient=new mgoogleApiClient.Builder(this).
}

}

1 个答案:

答案 0 :(得分:0)

这显然不会编译

IUnityContainer.Resolve

您无法使用之前未定义的mgoogleApiClient= new mgoogleApiClient 创建new x。而且您只能从类创建x,而不能创建字段或变量引用

See Google Documentation,但你打算这样做

new