代码之家  ›  专栏  ›  技术社区  ›  Greelings

类型“com.google.android.gms.gcm.task”没有类型参数

  •  0
  • Greelings  · 技术社区  · 6 年前

    我有这个错误

    类型“com.google.android.gms.gcm.task”没有类型参数

    当我写作的时候

    Task<LocationSettingsResponse> task = LocationServices.getSettingsClient(context).checkLocationSettings(builder.build());
    

    我想我输入了错误的“任务”类。要导入的依赖项的名称是什么?

    1 回复  |  直到 6 年前
        1
  •  -1
  •   Greelings    6 年前
    implementation 'com.google.android.gms:play-services-tasks:16.0.1'
    

    解决了我的问题