Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Unable to build for Android (Facebook plugin minSdkVersion error)
Started by yosu Nov 25 2019 06:13 PM

7 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

yosu

[GLOBAL: userInfoPane.html]
yosu
  • Contributor

  • 526 posts
  • Corona SDK

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 },
			
        },
	},
......


[TOPIC: post.html]
#2

Gent

[GLOBAL: userInfoPane.html]
Gent
  • Observer

  • 20 posts
  • Corona SDK

We are have same issue.
Corona SDK: Version 2019.3540



[TOPIC: post.html]
#3

umalemon

[GLOBAL: userInfoPane.html]
umalemon
  • Contributor

  • 139 posts
  • Corona SDK

I have the same problem.
Corona 2019.3556
What is going on?
 
Only Android has this problem. iOS builds successfully.


[TOPIC: post.html]
#4

umalemon

[GLOBAL: userInfoPane.html]
umalemon
  • Contributor

  • 139 posts
  • Corona SDK

This problem seems to have been solved by Corona engineers.
Now the build is successful.


[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,393 posts
  • Enterprise

Maybe add this to your build.settings:

 

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



[TOPIC: post.html]
#6

umalemon

[GLOBAL: userInfoPane.html]
umalemon
  • Contributor

  • 139 posts
  • Corona SDK

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.

 
 


[TOPIC: post.html]
#7

umalemon

[GLOBAL: userInfoPane.html]
umalemon
  • Contributor

  • 139 posts
  • Corona SDK

Uploading .aab to GooglePlay fails.
I get an error message that "fb" is an invalid language.
Is this related to the Facebook API?


[TOPIC: post.html]
#8

umalemon

[GLOBAL: userInfoPane.html]
umalemon
  • Contributor

  • 139 posts
  • Corona SDK

It continues here.



[topic_controls]
[/topic_controls]