Old apps new to get an api level upgraded

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

What version of Corona are you using?
 

Rob

The newest

@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.

@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

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.

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

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

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