Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Old apps new to get an api level upgraded
Started by Dritoncazimi Oct 31 2019 08:57 AM

8 replies to this topic
google play api level
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Dritoncazimi

[GLOBAL: userInfoPane.html]
Dritoncazimi
  • Observer

  • 6 posts
  • Corona SDK

I have the source code of the app that i want to change the api target/level so it doesnt get taken down by google play. But i cant figuere out how i do that. And i cant seem to run the app on coronalabs simulator even tho in runs on google play. It says something like 

WARNING: Native video objects are not supported in the simulator. Please build for device

WARNING: V1 graphics compatibility is deprecated. Some features may not work as expected
 


[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

What version of Corona are you using?
 

Rob



[TOPIC: post.html]
#3

Dritoncazimi

[GLOBAL: userInfoPane.html]
Dritoncazimi
  • Observer

  • 6 posts
  • Corona SDK

The newest



[TOPIC: post.html]
#4

XeduR @Spyric

[GLOBAL: userInfoPane.html]
XeduR @Spyric
  • Contributor

  • 981 posts
  • Corona SDK

@Dritoncazimim,

Videos are not supported on Windows, which is why the simulator tells you to build for a device. I do believe that videos run on Mac though. There is no error, just a warning. Graphics V1, on the other hand, is like +6 year old graphics system that Corona used. It has been since updated and you need to update your code correspondingly. This is just about syntax and such, e.g. how anchors work with display objects, etc.



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

@Dritoncazimim, can you provide the exact version number in the format of nnnn.xxxx. The "Latest" doesn't mean any thing. It could mean you're using the latest public build (2018.3326) or the latest daily build (2019.3545).

 

@XeduR is right about the simulator and native objects. Some native objects don't work in the simulator because it's not a device. Build for a mobile device and test your app for that.

 

The Graphics v1 being deprecated is a little more complex. You could be using a line in your config.lua that lets Corona still support some graphics v1 features, which means you are probably still using some graphics v1 features in your app. It's a warning that can be ignored, but you really should spend the time updating the app so that it doesn't use those features.

 

The core changes:  Some display.* objects x,y was the top left corner. Now all are by default centered.

:setReferencePoint() has been replaced by .anchorX and .anchorY

:setTextColor() has been replaced by :setFillColor()

Colors are no longer 0..255, but 0..1. Simply divide any color values by 255 to convert it.  For instance, this orange: setFillColor(255,127,0) would become :setFillColor(255/255, 127/255, 0/255) or just do :setFillColor(1, 0.5, 0)

 

Rob



[TOPIC: post.html]
#6

Dritoncazimi

[GLOBAL: userInfoPane.html]
Dritoncazimi
  • Observer

  • 6 posts
  • Corona SDK

I changed to mac and my second app is working but my first app is getting this error
 

 ERROR: Runtime error
                    director.lua:934: ERROR: table expected. If this is a function call, you might have used '.' instead of ':'
                    stack traceback:
                    [C]: in function 'insert'
                    director.lua:934: in function 'fxEnded'
                    director.lua:1233: in function <director.lua:1231>
                    (tail call): ?
                    ?: in function '?'
                    ?: in function <?:190>

Anybody knows what the problem is? I have never programmed in lua before.


[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

You have some very old code. This error is coming from the Director Class. This was a third-party scene manager tool that pre-dates our Storyboard (replaced by Composer today). 

 

The developer of Director hasn't been active since before 2013. It will likely need to be updated (you have the .lua source for it).

 

Rob



[TOPIC: post.html]
#8

Dritoncazimi

[GLOBAL: userInfoPane.html]
Dritoncazimi
  • Observer

  • 6 posts
  • Corona SDK

What do you mean with "you have the .lua source for it".



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,300 posts
  • Enterprise

Somewhere in your project, there is a file named Director.lua. It's a file you can edit and change for your needs.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: google play, api level