How to build APK with targetSdkVersion 29?

Hello everybody,
I am publishing a game to the play store, but when I upload the release apk I get the following message:
“Your application is currently targeting API level 27 and should aim for a minimum API level of 29 to ensure it is developed using the latest APIs, with optimal security and performance. Change your app’s target API level to minimum 29.”

How can I fix it? I tried to find the solution but it all failed.
I will appreciate any answers, thanks all!

Update to the newest Solar2D build.

I have updated to Solar2D 2020.3620 but when I build the apk I get [Build Error # 1]
Here is the log I got:
“Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
09:06:00.076 java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
09:06:00.076 at org.codehaus.groovy.vmplugin.VMPluginFactory.(VMPluginFactory.java:43)
09:06:00.076 at org.codehaus.groovy.reflection.GroovyClassValueFactory.(GroovyClassValueFactory.java:35)
09:06:00.076 at org.codehaus.groovy.reflection.ClassInfo.(ClassInfo.java:107)
09:06:00.076 at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
09:06:00.076 at org.codehaus.groovy.reflection.ReflectionCache.(ReflectionCache.java:39)
09:06:00.076 at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:210)
09:06:00.076 at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:108)
09:06:00.076 at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.(MetaClassRegistryImpl.java:86)
09:06:00.076 at groovy.lang.GroovySystem.(GroovySystem.java:36)
09:06:00.076 at org.codehaus.groovy.runtime.InvokerHelper.(InvokerHelper.java:86)
09:06:00.076 at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
09:06:00.076 at groovy.lang.GroovyObjectSupport.(GroovyObjectSupport.java:32)
09:06:00.076 at org.gradle.internal.extensibility.DefaultExtraPropertiesExtension.”

I’d suggest searching the forums for “Build Error #1” because it seems there can be multiple reasons for it such as JDK version, output folder path or non-ASCII characters in path.

Here: https://forums.solar2d.com/search?q=build%20error%201