Android 14 (API Level 34)

Try only the target SDK Version:
@ jdsmedeirosbr

targetSdkVersion = “34”

settings = {
    orientation = {
        default = "portrait",
        supported = { "portrait", "portraitUpsideDown" }
    },
    android = {
        targetSdkVersion = "34",
        usesPermissions = {
            "android.permission.INTERNET",
        },
    },
}

understand.Then I would advise you to set up a native build process if you haven’t tried it yet. The build process works fine.

Try:

Then you can change it in the build.gradle file:
image

Do you use any Plugins?

Yes please update Solar2D to utilize API level 34! This is much needed.

I’m not sure if it’s possible, but it would also super helpful to begin working on support for API level 35, so this doesn’t have to be a last minute change each time.

Thank you!

Yes, I understand, someone would have to make an update in the Solar2D version:

@vlads or @Scott_Harrison

Will look into this

5 Likes

Any updates on this? hoping to get this as soon as possible as i recall last year crashes and anrs were an issue with updating the api 33 and would like to get some tests out before deadlines to make sure all is functioning as it should be.

I made version that supports target 34

4 Likes

Legend! Thanks @Scott_Harrison

Error 256:

Execution failed for task ‘:App:desugarReleaseFileDependencies’.

A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction
Error while dexing.

2 Likes

I have a similar error

FAILURE: Build failed with an exception.
 * What went wrong:
Execution failed for task ':App:desugarReleaseFileDependencies'.
 > A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction
> Error while dexing.

+1 me too.

1 Like

I just chatted with Vlad. He and Scott are continuing to work on the issue.

8 Likes

That’s a very helpful explanation. Thank you!
I guess I have to be patient and wait for Solar2d to be updated, but damn, I’m planning a vacation in August. Seems like a priority like this should be at the top of Solar2d’s list.
P.S. Don’t misinterpret! Not upset with you. Your explanation is really useful. Just nervous about Solar2d. :slight_smile:

I am sure that everything will be ok because Vlads have commited two important modifications on the master branch yesterday.
image
So the fix will arrive in few days I imagine.

These were listed in today’s build: 3707

1 Like

Requesting an extension is quick and easy. Here’s how to do it:

1 Like

Tried to build for android using latest 3707 solar2d update and get an error 256:

Jul 21 13:01:27.186 ERROR:/Users/VV_1/.gradle/caches/transforms-3/e95fefe9e0be489136c0dc2d76aa5df8/transformed/jetified-Corona/jars/classes.jar: D8: java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
                    
                    FAILURE: Build failed with an exception.
                    
                    * What went wrong:
                    Execution failed for task ':App:desugarReleaseFileDependencies'.
                    > A failure occurred while executing com.android.build.gradle.internal.tasks.DexFileDependenciesTask$DexFileDependenciesWorkerAction
                       > Error while dexing.
                    
                    * Try:
                    > Run with --stacktrace option to get the stack trace.
                    > Run with --info or --debug option to get more log output.
                    > Run with --scan to get full insights.
                    
                    * Get more help at https://help.gradle.org
                    
                    BUILD FAILED in 48s
Jul 21 13:01:27.187 
Jul 21 13:01:27.294 Android build failed (256) after 52 seconds
Jul 21 13:01:27.654 ERROR: Build Failed: Error code: 256
Jul 21 13:01:27.654 

1 Like

Situation is complicated :man_shrugging:

Build 2024.3707 doesn’t address the API Level 34 issue. If you’re having trouble with that build, you should start a new thread or, even better, log it as an issue on GitHub.

1 Like

Hi Solar comunnity,

Do you have any update about this issue? i am getting this error when i try to build:

FAILURE: Build failed with an exception.
                    
                    * What went wrong:
                    Could not resolve all files for configuration 'classpath'.
                    > Could not find klaxon-5.0.1.jar (com.beust:klaxon:5.0.1).
                      Searched in the following locations:
                          https://jcenter.bintray.com/com/beust/klaxon/5.0.1/klaxon-5.0.1.jar

Thanks in advance.

What version of solar2d are you using?