Android gradle プラグインのバージョンをに上げただけcom.android.tools.build:gradle:3.3.0-alpha06
で、プロジェクトが次のエラーでコンパイルに失敗しました。
None of the following functions can be called with the arguments supplied:
public inline fun <reified W : `Worker;`>
PeriodicWorkRequestBuilder(repeatInterval: `Duration;`,
flexTimeInterval: `Duration;`): PeriodicWorkRequest.`Builder;` defined
in androidx.work
public inline fun <reified W : `Worker;`>
PeriodicWorkRequestBuilder(repeatInterval: Long, repeatIntervalTimeUnit: `TimeUnit;`): PeriodicWorkRequest.`Builder;` defined in androidx.work
コードは非常に簡単です。
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
PeriodicWorkRequestBuilder<MyWorker>(1L, TimeUnit.HOURS)
}
class MyWorker: Worker() {
override fun doWork(): Result {
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}
サンプル リポジトリがあります: https://github.com/martinbonnin/TestCanary6
私は何かを見逃していますか、それともアンドロイドスタジオのバグですか?