Designcode.io and Flutter: Getting Android to run

Prenez
2 min readJul 29, 2023

--

Getting the Xcode project to run is pretty easy, but the Android project is a challenge. Fortunately, I’m already a Flutter and Android developer so I had some experience going in. Here were the changes I had to make to the project.

Alway go into Android and gradle sync when you make these changes. Don’t forget to clean the project.

Upgrade the Embedding

In the Android Manifest XML file, change the android name to this: <application

android:name=”${applicationName}”

This makes the embedding compatible with version 2.

Upgrade your gradle version

in build.gradle
classpath ‘com.android.tools.build:gradle:7.2.1’

in grade-wrapper properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip

you mileage may vary, but check these and run sync. Yes, I see that they’re not the same version. When I tried to make the build.gradle line 7.3.3 it broke. Guess it’s the build tool vs the wrapper.

Check your Java SDK

Make sure it’s version 11 of some kind. 16 is coming (or here) so keep an eye on that, but 11 makes it all work currently.

Check your compile SDK version

in build.gradle:

android {

compileSdkVersion 31

your mileage may vary, but check the version against your device or emulator version

Check your Kotlin version

in build.gradle
buildscript {

ext.kotlin_version = ‘1.8.0’

Your Best Friends

…are ./gradlew clean, flutter clean and flutter pub get.

That’s it!

Let me know in the comments if you hit another problem.

--

--

Prenez
Prenez

Written by Prenez

Writes iOS apps in Swift and stories in American English.

No responses yet