Android Question MyLocation example causes error: No resource identifier found for attribute 'foregroundServiceType' in package 'android'

toby

Active Member
Licensed User
I was trying to compile the Mylocation example as it is and got the following error. Could someone kindly show me how to fix it, please?
B4A: 10.5, Java 11. Phones: Android 8 and 11

Compiler error:
B4A Version: 10.50
Parsing code.    (0.00s)
    Java Version: 11
Building folders structure.    (0.00s)
Compiling code.    (0.06s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Generating R file.    Error
AndroidManifest.xml:40: error: No resource identifier found for attribute 'foregroundServiceType' in package 'android'
 

toby

Active Member
Licensed User
I solved it by switching sdk version of android.jar from 28 to 30; both versions are provided with the latest sdk components.
 
Upvote 0
Top