1
votes

my flutter application is worked fine with flutter run but when i come to build an APK it failed with an error

A problem occurred configuring root project 'android_intent'. SDK location not found. Define location with sdk.dir in the local.properties file or with an > ANDROID_HOME environment variable.

i don't know what a android_intent and i tried everything but i couldn't solve it

im using

dependencies {
    classpath 'com.android.tools.build:gradle:3.5.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    // Add the google services classpath
    classpath 'com.google.gms:google-services:4.3.3'
}

and my locale.properties is that

sdk.dir=E:\\development\\android-sdk
flutter.sdk=E:\\development\\flutter
flutter.buildMode=release
flutter.versionName=1.3.0

and my sitting.gradle contains include ':app' at the top

any way i could build my sdk ??

1

1 Answers

0
votes

It gives the error of you not having an environment variable set up, try this:

MyComputer -> Properties -> Advanced sys settings -> Environment Variables -> 

Add ANDROID_HOME=C:...\android-sdk_folder

Also there may be a problem with one of your packages. Make sure they are all up to date.