Problem with store.init for android.

First I’ll let you know, that I’ve already have a similar thread in this forum, but since I’ve managed to dig a little deeper, I’ll start this new one. Please notify me, if it’s not acceptable.

I’m running a simple app, where I need to buy stuff. non-consumable, from Googles play store. But whenever I try to init google, I get the message (using adb)

‘No license key was supplied to config.lua.’

The problem is, that it is working on some devices, so it obviously can’t be a problem with the key. At the moment, I’ve stripped down the entire app, to make sure that it isn’t a third party plugin who makes the trouble. Its basically just a call to google.

 

if ( display.pixelHeight / display.pixelWidth \> 1.72 ) then application = { content = { width = 320, height = 570, scale = "letterBox", xAlign = "center", yAlign = "center", imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, } else application = { content = { width = 320, height = 512, scale = "letterBox", xAlign = "center", yAlign = "center", imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, license = { google = { key = "some key", }, }, } end  

Hi there,

if your display.pixelHeight / display.pixelWidth > 1.72, then your code will never include your Google key - it’s not mentioned in the first part of your if/then statement.  

That’s probably why it works on some devices and not others.

Oh haha yeah, you’re right! I thought (and hoped) that it was just an stupid error from my part. Damn, how much time you can somebody spend on such a stupid thing :). Thank you!

Hi there,

if your display.pixelHeight / display.pixelWidth > 1.72, then your code will never include your Google key - it’s not mentioned in the first part of your if/then statement.  

That’s probably why it works on some devices and not others.

Oh haha yeah, you’re right! I thought (and hoped) that it was just an stupid error from my part. Damn, how much time you can somebody spend on such a stupid thing :). Thank you!