Android Question Manifest Error with SDK update

Scantech

Well-Known Member
Licensed User
Longtime User
B4A Version: 9.50
Java Version: 8
Parsing code. (3.68s)
Building folders structure. (0.03s)
Compiling code. (5.56s)
Compiling layouts code. (0.10s)
Organizing libraries. (0.02s)
(AndroidX SDK)
Generating R file. Error
AndroidManifest.xml:45: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').

AddManifestText(
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)

AddManifestText(
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28"/>)

'SetApplicationAttribute(android:icon, "@drawable/icon") 'using adaptive icons. this not needed
SetApplicationAttribute(android:label, "$LABEL$")

SetApplicationAttribute(android:largeHeap,"true")

SetApplicationAttribute(android:icon, "@mipmap/ic_launcher")
CreateResource(mipmap-anydpi-v26, ic_launcher.xml,
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/background"/>
<foreground android:drawable="@mipmap/foreground"/>
</adaptive-icon>
)

'Permissions--------------------------------------------------------------------------------
AddPermission(android.permission.BLUETOOTH_ADMIN)
AddPermission(android.permission.ACCESS_COARSE_LOCATION)
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.ACCESS_BACKGROUND_LOCATION)
'-------------------------------------------------------------------------------------------

AddManifestText(<uses-feature android:name="android.hardware.location.gps"/>)

SetApplicationAttribute(android:theme, "@style/MyAppTheme")
CreateResource(values, theme.xml,
<resources>
<style name="MyAppTheme" parent="@style/Theme.AppCompat">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="preferenceTheme">@style/PreferenceThemeOverlay.Material</item>
<item name="asp_preferenceIconTint">?colorAccent</item>
<item name="asp_preferenceDialogIconTint">?asp_preferenceIconTint</item>
<item name="windowActionModeOverlay">true</item>
</style>
</resources>
)

'Disable this for Amazon and Blackberry
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
'CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)

CreateResourceFromFile(Macro, GooglePlayBilling.GooglePlayBilling)

'This is a sample AdMob app id. You need to change it to your id.
AddReplacement($ADMOB_APP_ID$, ca-app-pub-hidden values)
'Google Console won't allow this duptlicates
'AddManifestText(<uses-permission
' android:name="android.permission.WRITE_EXTERNAL_STORAGE"
' android:maxSdkVersion="18" />
')

'File uri for sharing files
AddApplicationText(
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="$PACKAGE$.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/>
</provider>
)

CreateResource(xml, provider_paths,
<files-path name="name" path="shared" />
)

It is related to this in Manifest. Disable them then it will be ok.
B4X:
'CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
'CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
'CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
'CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)

I have an issue with firebaseAdmob (Guava/listenablefuture issue) in the other thread which is not resolved. So i decided to test my app without the firebaseadmob and this error message above occurs.

Update: I only use FirebaseAdmob. It makes sense to not use them in manifest. I think i need to disable all of them anyways or this error will occur?
 
Last edited:
Top