0
\$\begingroup\$

In Game Maker Studio 1.4 I'm trying to export my game to Android API 29. Whenever I start to compile, the build fails because the API 28 support library is too low for the Target API 29. I have the latest Android Studio and SDK's installed. I don't know how to fix it.

Here's a pic of my target sdk settings:

Setting SDK's

Here's my lint file saying what the error is: Lint Report Error

\$\endgroup\$
2
  • \$\begingroup\$ I've been doing some research and I think I need to add AndroidX to my gradle.properties file but not exactly sure how to go about it? \$\endgroup\$ – Rubbish Ambush Jul 31 '20 at 9:53
  • \$\begingroup\$ Should Support lib be 29? \$\endgroup\$ – Juanpa Aug 3 '20 at 22:52
1
\$\begingroup\$

I found out that to export to API 29 and above; Android support libraries are no longer supported for those API's. You have to merge your project over to Androidx. You have the target SDK settings look like mine above. Then you open your Root gradle.properties file and paste the following lines of code:

Example Location: D:\SteamLibrary\steamapps\common\gamemaker_studio\Android\runner\RootFiles

android.useAndroidX=true

android.enableJetifier=true

Then you add some code to the Android module gradle.build file not the Root gradle.build file. You add this to the gradle file in the ProjectFiles folder:

lintOptions {
   abortOnError false
}

Which will make game maker ignore the build failure and will then build successfully. The location for the build.gradle file is your Game maker studio install location for example:

D:\SteamLibrary\steamapps\common\gamemaker_studio\Android\runner\ProjectFiles\build.gradle

Your file should look like this under the android section after you've enter the code above:

android {
    compileSdkVersion ${YYAndroidCompileSDKVersion}
    buildToolsVersion '${YYAndroidBuildToolsVersion}'

    ${YYAndroidJavaMaxHeapSize}
    
    defaultConfig {
        applicationId "${YYAndroidPackageName}"
        minSdkVersion ${YYAndroidMinSDKVersion}
        targetSdkVersion ${YYAndroidTargetSDKVersion}
        multiDexEnabled true
    }
    lintOptions {
        abortOnError false
    }

    signingConfigs {
        release {
            storeFile file("${YYAndroidKeyStoreFile}")
            storePassword "${YYAndroidKeyStoreFilePassword}"
            keyAlias "${YYAndroidKeyAlias}"
            keyPassword "${YYAndroidKeyPassword}"
        }
    }
   
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            signingConfig signingConfigs.release
        }
    }
    
    ${YYAndroidSplits}
}

It's possible to export to newer API's in Game maker studio 1.4 you just won't be able to put advertisements in your game. You'll have to make a full game and sell it if you want to make money off of it.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ the file is gradle.build or build.gradle? i do this in build.gradle and anithing change you can explain better this tutorial its very important thanks \$\endgroup\$ – Sebastian Zea Nov 21 '20 at 14:10
  • \$\begingroup\$ This should help, sorry for the confusion. Example location: D:\SteamLibrary\steamapps\common\gamemaker_studio\Android\runner\RootFiles In the RootFiles location there should be a file "gradle" you want to open that file and paste the following code: org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true The top line helps speed up the compile time. Then you want to go to for Ex: D:\SteamLibrary\steamapps\common\gamemaker_studio\Android\runner\ProjectFiles\build.gradle and add "lintOptions { abortOnError false }" as shown above. \$\endgroup\$ – Rubbish Ambush Nov 22 '20 at 17:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.