Unable to build for Android (Facebook plugin minSdkVersion error)

Hi,

Simulator 2019.3540

I have been trying to build for the past 2 hours. It worked fine yesterday, but now I keep on getting this error which is related to facebook. It will build fine if I remove the facebook plugin or if I set android minSdkVersion = "23"

uses-sdk:minSdkVersion 15 cannot be smaller than version 23 declared in library [plugin-facebook-v4a.aar] C:\Users\XX\.gradle\caches\transforms-2\files-2.1\bf6fdab608d536d6e9e603668f4683ba\plugin-facebook-v4a\AndroidManifest.xml as the library might be using APIs not available in 15 09:50:23.190 Suggestion: use a compatible library with a minSdk of at most 15, 09:50:23.190 or increase this project's minSdk version to at least 23, 09:50:23.190 or use tools:overrideLibrary="plugin.facebook.v4a" to force usage (may lead to runtime failures) 09:50:23.190 09:50:23.190 FAILURE: Build failed with an exception.

Part of build.settings

settings = { plugins = { ["plugin.openssl"] = { publisherId = "com.coronalabs", }, -- ["plugin.notifications"] = { publisherId = "com.coronalabs" }, -- old GCM http://coronalabs.com/blog/2015/01/21/notifications-have-been-moved-to-a-plugin/ ["plugin.notifications.v2"] = { publisherId = "com.coronalabs" }, -- FCM ! ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs" }, -- in-app purchase for Google ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs" }, -- corona show-popup / Sharing ["plugin.facebook.v4a"] = { publisherId = "com.coronalabs" }, -- ['plugin.qrscanner'] = {publisherId = 'com.spiralcodestudio'}, -- ['plugin.vibrator'] = {publisherId = 'com.spiralcodestudio'}, -- ["CoronaProvider.native.popup.activity"] = { publisherId = "com.coronalabs" , supportedPlatforms = { iphone=true } }, ["plugin.calendar"] = { publisherId = "com.coronalabs" }, }, build = { -- neverStripDebugInfo = false }, excludeFiles = { -- Exclude all files at paths which end with "secret.txt": -- all = { "\*secret.txt" }, -- Exclude all Android icon files and .ogg files in the "music" directory: -- iphone = { "Icon-\*dpi.png", "music/\*.ogg" }, -- Exclude iOS "retina" image files and .m4a files in the "music" directory: all = { -- Just for testing graphs -- "asset/background/\*", -- "asset/images\_sad/\*", }, android = { -- "asset/\*/\*@4x.png", -- "asset/\*/\*@4x.jpg", "Default-568h@2x.png", "Default-667h@2x.png", "Default-736h@3x.png", "Default-Landscape-568h@2x.png", "Default-Landscape-667h@2x.png", "Default-Landscape-736h@3x.png", "Default-Portrait@2x.png", "Default-Landscape@2x.png", -- "AppIcon\*", -- "iTunesArtwork\*", } }, splashScreen = { enable = false }, android = { facebookAppId = "[MASKED]", -- (15-Aug-18) useGoogleServicesJson = true, permissions = { { name = ".permission.C2D\_MESSAGE", protectionLevel = "signature" }, }, usesPermissions = { "com.android.vending.BILLING", -- in-app purchase -- "android.permission.CALL\_PHONE", -- "android.permission.READ\_PHONE\_STATE", -- "android.permission.VIBRATE", "android.permission.INTERNET", -- "android.permission.ACCESS\_NETWORK\_STATE", -- "android.permission.PHONE", -- "android.permission.CALL\_PHONE", -- "android.permission.GET\_ACCOUNTS", -- For GCM push-notification "android.permission.RECEIVE\_BOOT\_COMPLETED", -- For GCM push-notification "com.google.android.c2dm.permission.RECEIVE", -- For GCM push-notification ".permission.C2D\_MESSAGE", -- For GCM push-notification -- "android.permission.ACCESS\_FINE\_LOCATION", -- "android.permission.ACCESS\_COARSE\_LOCATION", -- "android.permission.STORAGE", "android.permission.CAMERA", "android.permission.READ\_EXTERNAL\_STORAGE", -- to access photo gallery "android.permission.WRITE\_EXTERNAL\_STORAGE", -- Used in full version, to upload photo }, usesFeatures = { -- If you set permissions "ACCESS\_FINE\_LOCATION" and "ACCESS\_COARSE\_LOCATION" above, -- then you may want to set up your app to not require location services as follows. -- Otherwise, devices that do not have location sevices (such as a GPS) will be unable -- to purchase this app in the app store. { name = "android.hardware.location", required = false }, { name = "android.hardware.location.gps", required = false }, { name = "android.hardware.location.network", required = false }, { name = "android.hardware.telephony", required = false }, { name = "android.hardware.telephony.cdma", required = false }, { name = "android.hardware.telephony.gsm", required = false }, }, }, ......

We are have same issue.
Corona SDK: Version 2019.3540

I have the same problem.

Corona 2019.3556

What is going on?

Only Android has this problem. iOS builds successfully.

This problem seems to have been solved by Corona engineers.

Now the build is successful.

Maybe add this to your build.settings:

http://docs.coronalabs.com/guide/distribution/advancedSettings/index.html#minimum-sdk-version

Hi Rob !
I haven’t added this, but the build succeeds.

    android =     {         minSdkVersion = "16",     },

But if you recommend it, I will add it from now on.

Uploading .aab to GooglePlay fails.

I get an error message that “fb” is an invalid language.

Is this related to the Facebook API?

It continues here.

https://forums.coronalabs.com/topic/75884-fan-plugin-sdk-too-old/