0

Constructing a RenderScript for my app using the line

val rs = RenderScript.create(getContext())

Android Studio warns me that "CameraX.getContext can only be called from within the same library group (groupId=androidx.camera)" What should I be doing instead to avoid this warning?

Note: Using this instead of getContext() generates an error.

Keith
  • 1,777
  • 3
  • 15
  • 20
  • you might want to use, YourAcitivityName.this or want to pass context object if it's a non-activity class – Pavneet_Singh May 05 '20 at 19:34
  • No luck with `.this`. I tried passing the context up from MainActivity and that just gave me errors. – Keith May 05 '20 at 20:59
  • then members can't help you without looking at the code. Please follow SO guidelines to form a question [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) and [keypoints to enhance qulity of question](http://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist) – Pavneet_Singh May 06 '20 at 10:44

0 Answers0