I have this error compiling my flutter application, I am using a huawei p40 lite (without google services) to reproduce this error. On devices with google services it works perfectly.
E/AndroidRuntime(29459): FATAL EXCEPTION: main
E/AndroidRuntime(29459): Process: com.google.android.gms.persistent, PID: 29459
E/AndroidRuntime(29459): java.lang.RuntimeException: Unable to create service com.google.android.location.internal.GoogleLocationManagerService: java.lang.SecurityException: Failed to find provider com.google.settings for
user 0; expected to find a valid ContentProvider for this authority
E/AndroidRuntime(29459): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4650)
E/AndroidRuntime(29459): at android.app.ActivityThread.access$2800(ActivityThread.java:308)
E/AndroidRuntime(29459): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2330)
E/AndroidRuntime(29459): at android.os.Handler.dispatchMessage(Handler.java:110)
E/AndroidRuntime(29459): at android.os.Looper.loop(Looper.java:219)
E/AndroidRuntime(29459): at android.app.ActivityThread.main(ActivityThread.java:8349)
E/AndroidRuntime(29459): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(29459): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
E/AndroidRuntime(29459): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
E/AndroidRuntime(29459): Caused by: java.lang.SecurityException: Failed to find provider com.google.settings for user 0; expected to find a valid ContentProvider for this authority
E/AndroidRuntime(29459): at android.os.Parcel.createException(Parcel.java:2071)
E/AndroidRuntime(29459): at android.os.Parcel.readException(Parcel.java:2039)
E/AndroidRuntime(29459): at android.os.Parcel.readException(Parcel.java:1987)
E/AndroidRuntime(29459): at android.content.IContentService$Stub$Proxy.registerContentObserver(IContentService.java:1234)
E/AndroidRuntime(29459): at android.content.ContentResolver.registerContentObserver(ContentResolver.java:2301)
E/AndroidRuntime(29459): at android.content.ContentResolver.registerContentObserver(ContentResolver.java:2289)
E/AndroidRuntime(29459): at azlm.<init>(:com.google.android.gms@19420000@19.4.20 (000300-271418971):17)
E/AndroidRuntime(29459): at aznh.<init>(:com.google.android.gms@19420000@19.4.20 (000300-271418971):1)
E/AndroidRuntime(29459): at com.google.android.location.internal.GoogleLocationManagerChimeraService.onCreate(:com.google.android.gms@19420000@19.4.20 (000300-271418971):6)
E/AndroidRuntime(29459): at ebp.onCreate(:com.google.android.gms@19420000@19.4.20 (000300-271418971):1)
E/AndroidRuntime(29459): at msb.onCreate(:com.google.android.gms@19420000@19.4.20 (000300-271418971):4)
E/AndroidRuntime(29459): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4636)
E/AndroidRuntime(29459): ... 8 more
New huawei devices no longer come with google services, does anyone know how I can correct this problem?.