You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code has @SuppressLint, but lint still shows error on it. We should figure out how to handle this.
$ ./gradlew :app:lintDebug
Reusing configuration cache.
> Task :app:compileDebugKotlin
w: file:///usr/local/sda1/android/social/app/src/main/java/com/google/android/samples/socialite/ui/camera/Camera.kt:99:51 Unnecessary safe call on a non-null receiver of type WindowLayoutInfo
w: file:///usr/local/sda1/android/social/app/src/main/java/com/google/android/samples/socialite/ui/camera/Camera.kt:101:37 Condition 'foldingFeature != null' is always 'true'
w: file:///usr/local/sda1/android/social/app/src/main/java/com/google/android/samples/socialite/ui/camera/Camera.kt:193:57 'ArrowBack: ImageVector' is deprecated. Use the AutoMirrored version at Icons.AutoMirrored.Filled.ArrowBack
> Task :app:lintReportDebug
Wrote HTML report to file:///usr/local/sda1/android/social/app/build/reports/lint-results-debug.html
> Task :app:lintDebug FAILED
Lint found 1 errors, 79 warnings. First failure:
/usr/local/sda1/android/social/app/src/main/java/com/google/android/samples/socialite/ui/camera/Camera.kt:171: Error: Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException [MissingPermission]
viewModel.startVideoCapture(onMediaCaptured)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "MissingPermission":
This check scans through your code and libraries and looks at the APIs
being used, and checks this against the set of permissions required to
access those APIs. If the code using those APIs is called at runtime, then
the program will crash.
Furthermore, for permissions that are revocable (with targetSdkVersion 23),
client code must also be prepared to handle the calls throwing an exception
if the user rejects the request for permission at runtime.
The full lint text report is located at:
/usr/local/sda1/android/social/app/build/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintDebug'.
> 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:
For more details, see https://developer.android.com/studio/write/lint#snapshot
Lint found 1 errors, 79 warnings. First failure:
/usr/local/sda1/android/social/app/src/main/java/com/google/android/samples/socialite/ui/camera/Camera.kt:171: Error: Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException [MissingPermission]
viewModel.startVideoCapture(onMediaCaptured)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "MissingPermission":
This check scans through your code and libraries and looks at the APIs
being used, and checks this against the set of permissions required to
access those APIs. If the code using those APIs is called at runtime, then
the program will crash.
Furthermore, for permissions that are revocable (with targetSdkVersion 23),
client code must also be prepared to handle the calls throwing an exception
if the user rejects the request for permission at runtime.
The full lint text report is located at:
/usr/local/sda1/android/social/app/build/intermediates/lint_intermediate_text_report/debug/lint-results-debug.txt
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 10s
27 actionable tasks: 8 executed, 19 up-to-date
Configuration cache entry reused.
The text was updated successfully, but these errors were encountered:
The code has
@SuppressLint
, but lint still shows error on it. We should figure out how to handle this.android {
lint {
baseline = file("lint-baseline.xml")
}
}
The text was updated successfully, but these errors were encountered: