pantasystem / Milktea

Misskey, MastodonのAndroidクライアント「Milktea」のソースコード
GNU General Public License v3.0
251 stars 22 forks source link

CI/CD Android Unit Testが落ちる #1860

Closed pantasystem closed 1 year ago

pantasystem commented 1 year ago

Android 14のアラームの権限対応をした時に何かミスってる可能性がある

> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, or create a baseline to see only new errors.
  To create a baseline, run `gradlew updateLintBaseline` after adding the following to the module's build.gradle file:

  android {
      lint {
          baseline = file("lint-baseline.xml")
      }
  }

  For more details, see https://developer.android.com/studio/write/lint#snapshot

  /home/runner/work/Milktea/Milktea/modules/worker/src/main/java/net/pantasystem/milktea/worker/emoji/cache/CacheCustomEmojiImageWorker.kt:132: Error: Missing dataSync foregroundServiceType in the AndroidManifest.xml [SpecifyForegroundServiceType from androidx.work]
              ForegroundInfo(7, notification, ServiceInfo.FOREGROUND_SERVICE_TYPE_DATA_SYNC)
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     Explanation for issues of type "SpecifyForegroundServiceType":
     When using the setForegroundAsync() API, the application must override
     <service /> entry for SystemForegroundService to include the foreground
     service type in the  AndroidManifest.xml file.

     Vendor: Android Open Source Project
     Identifier: androidx.work
     Feedback: https://issuetracker.google.com/issues/new?component=409906

  1 errors, 0 warnings
pantasystem commented 1 year ago

appモジュールのAndroidManifestに記述していたserviceの項目を Workerのモジュールに移動したところうまく動作するようになった