-
-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix crashes by ensuring layout ID is set before inflating Camera View stub + raise AGP for Kotlin 1.7.0 compatibility #4794
Conversation
… set its visibility.
The CI linter is failing this build with errors in the pattern:
...given this error is unrelated to the changes in the PR; it seems likely this is caused by an environmental change. A direct answer to this error seems to be raising the min API level to 24, but I'm not sure that's expected or desirable. Other maintainers please advise. |
I've added raising min API level to 24 for expedience. Apparently, combining API 21 with JDK 8 If it's important to keep API 21 compatibility then I can edit this PR again, but we'd need to explicitly use |
I think that we'd like to keep API 21 as min for now. If you could do the changes described to keep the minSdk to 21 it would be great! |
Thanks @VaiTon ; looking again at the errors, I discovered they actually stem from incompatibility between the linter in Android Gradle Plugin |
Any update on this issue? Thanks. |
The crash fix itself was straightforward. @VaiTon I have applied a fix for the most recent run failure: un-mergeable Android Manifest of |
@chris-hatton I've reverted the minSdk change |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
Code was attempting to set the visibility of the View Camera stub before its source layout XML id was set.
This is an error because setting a View visible causes
inflate()
to be run in case it is not already inflated.With no XML id set; there is nothing to inflate and so subsequent code that assumes a view to be present fails.
Simply switching around the order of operations here...
... resolves the issue.
Related issues
Fixes #4685, #4686
Related PRs
Unblocks testing of #4777
Screenshots
N/A
Link to the automatically generated build APK
N/A