Fixed
Status Update
Comments
su...@google.com <su...@google.com> #2
Feel free to disable the link check as a workaround.
The Gradle equivalent is:
android {
lintOptions {
disable "DialogFragmentCallbacksDetector"
}
}
ch...@gmail.com <ch...@gmail.com> #3
Not all of our builds depend on androidx.fragment and if you do not use androidx.fragment and you add this disable flag, lint fails due to non-existant check DialogFragmentCallbacksDetector. If you do not plan on fixing this soon, I can try and see if we can only disable the check if we depend on androidx.fragment.
[Deleted User] <[Deleted User]> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 52b166175eabed99d14515190bfa0a7cea787004
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon May 10 16:11:44 2021
Fix OnCreateDialogIncorrectCallback lint on empty java classes
The OnCreateDialogIncorrectCallbackDetector lint rule currently checks
the first element of a list without verifying the item is actually
there. We should check if the item is null before we do anything else.
RelNote: "The `OnCreateDialogIncorrectCallbackDetector` no longer fails
on empty java classes/interfaces"
Test: java empty interface clean
Bug: 187524311
Change-Id: Iaff6c041370bd5a7c2ac8ef8c32a2e6f7a15e456
M fragment/fragment-lint/src/main/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetector.kt
M fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
https://android-review.googlesource.com/1702325
Branch: androidx-main
commit 52b166175eabed99d14515190bfa0a7cea787004
Author: Jeremy Woods <jbwoods@google.com>
Date: Mon May 10 16:11:44 2021
Fix OnCreateDialogIncorrectCallback lint on empty java classes
The OnCreateDialogIncorrectCallbackDetector lint rule currently checks
the first element of a list without verifying the item is actually
there. We should check if the item is null before we do anything else.
RelNote: "The `OnCreateDialogIncorrectCallbackDetector` no longer fails
on empty java classes/interfaces"
Test: java empty interface clean
Bug: 187524311
Change-Id: Iaff6c041370bd5a7c2ac8ef8c32a2e6f7a15e456
M fragment/fragment-lint/src/main/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetector.kt
M fragment/fragment-lint/src/test/java/androidx/fragment/lint/OnCreateDialogIncorrectCallbackDetectorTest.kt
ro...@gmail.com <ro...@gmail.com> #5
This has been fixed internally and will be available in the Fragment 1.4.0-alpha01
release.
su...@google.com <su...@google.com> #6
I am using 1.4.0-alpha01 of the Fragment Library but I am still getting this error.
su...@google.com <su...@google.com> #7
Re #6 - please file a new bug with a sample that reproduces your error.
ch...@instacart.com <ch...@instacart.com> #8
deleted
Description
Version used: 1.0.0-alpha12
After upgrading to alpha12, all of my Workers written in Kotlin (and CoroutineWorkers, FWIW), complain about the 'Result' return value with an error that says: "One type argument expected for class Result<out T>"
It appears that the Kotlin standard library contains a public inline Result class already:
The Kotlin Result class is automatically available in every file, so Android Studio (3.2.1) doesn't offer to import the androidx.work.Result class, causing the error since it assumes you want to use the already available kotlin Result.
There were two workarounds, neither very friendly:
1) Use the fully qualified androidx.work.Result
2) Manually adding the androidx.work.Result import statement
Note that:
- Using the fully qualified name, then using the Android Studio option to add import did not work
- Removing the doWork method entirely and using Android Studio's quick fix to implement the method did add an import to androidx.work.Result, so new classes would avoid running into this issue.