0

I recently installed Ubuntu 20.04.1 and I installed Android Studio to develop some applications using Flutter. Everything was fine but for this app which I develop I invoke some packages that require me to migrate to AndroidX. I followed the steps but I can not compile my code and complete the migration process.

I use the command "sudo flutter run" and I see this error:

* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type ChecksumService using BuildSessionScopeServices.createChecksumService().

May it be because I can not run Android Studio as a superuser? How can I solve this issue?

dramaticlook
  • 653
  • 1
  • 12
  • 39

1 Answers1

0

As I research suggested, snap creates an interference and violates on superuser access rights in linked requests by indirect software. For example if you tell "sudo Flutter run" to Android Studio it will work as in superuser mode but if your code has additional packages which require AndroidX migration to use Gradle during built process it will not be able to run the aforementioned command because the configuration of AndroidX is trying to perform sudo steps on the background and failing because of this 'SNAP' feature.

Just install the standalone version of Android Studio and extract the tar file and VIOLA :) you can run it in sudo mode.

dramaticlook
  • 653
  • 1
  • 12
  • 39