实施项目的含义(':urbanairship-fcm')

Meaning of implementation project(':urbanairship-fcm')

我正在阅读 https://github.com/urbanairship/android-library,我发现了这个:

dependencies {
    ...
    // Urban Airship SDK - FCM
    implementation 'com.urbanairship.android:urbanairship-fcm:9.7.1'
}

https://github.com/urbanairship/android-library 的示例项目中,他们使用的是:

dependencies {
    ...
    // Urban Airship - FCM
    implementation project(':urbanairship-fcm')
    ...
}

我期望示例项目有 implementation 'com.urbanairship.android:urbanairship-fcm:9.7.1' 而不是 implementation project(':urbanairship-fcm')'project(:urbanairship-fcm') 是指包含 urbanairship-fcm library/code 的文件夹吗?是指这个文件夹吗?: https://github.com/urbanairship/android-library/tree/master/urbanairship-fcm

谢谢。

更新 1: 基本上,我熟悉这种语法:implementation 'com.urbanairship.android:urbanairship-fcm:9.7.1'。我不熟悉这种语法:implementation project(':urbanairship-fcm')。如果我理解正确的话,implementation project(':urbanairship-fcm') 意味着有一个名为 urbanairship-fcm 的文件夹,其中包含带有 com.urbanairship.android:urbanairship-fcm 库的源代码。对吗?

https://github.com/urbanairship/android-library/tree/master/sample is outdated. For example, the Autopilot at https://github.com/urbanairship/android-library/blob/master/sample/src/main/java/com/urbanairship/sample/SampleAutopilot.java was last updated on Jan 29, 2018. It does not incorporate the following code that Airship mentions at https://docs.airship.com/platform/android/getting-started/#sdk-installation 处的示例项目:

// Android O
  if (Build.VERSION.SDK_INT >= 26) {
      Context context = UAirship.getApplicationContext();
      NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);

      NotificationChannel channel = new NotificationChannel("customChannel",
              context.getString(R.string.custom_channel_name,
              NotificationManager.IMPORTANCE_DEFAULT);

      notificationManager.createNotificationChannel(channel);
  }

所以我最好联系 Airship 支持请求示例项目的更新版本或跟进,因为我不能使用非常旧的示例项目作为参考。事实上,查看 https://github.com/urbanairship/android-library/blob/master/CHANGELOG.md,2019 年 1 月 28 日,当时可用的最新 Urban Airship SDK 是 "Version 8.9.7 - January 22, 2018"。我看不出该项目如何整合当今可用的最新 google-服务、播放服务和 Firebase 版本。

当您看到 implementation project(':urbanairship-fcm') 时,这意味着它是从本地模块而不是远程包中提取的。该示例设置为使用库源,因此我们可以使用示例应用程序来测试我们的开发更改。