How to release android apk for flutter application?

Answered

Hello, I'm new to IntelliJ and also to Flutter; I was able to debug the example application in the emulator, but I don't know how to release an apk that can be installed on other devices? Any advice?

0
5 comments

Please refer to https://docs.flutter.dev/deployment/android.

This is not IntelliJ IDEA specific question.

0

get the following in terminal when trying to debug or build. I installed JDK 17 trought Intellij but after a reboot it not worked anymore. Also tried to add the JAVA path to the enviroment variable wihout luck.

Any advice please?

 

C:\flutter\bin\flutter.bat --no-color build apk

Running Gradle task 'assembleRelease'...                        

ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
Running Gradle task 'assembleRelease'...                            52ms
Gradle task assembleRelease failed with exit code 1
Process finished with exit code 1

0

Set JAVA_HOME environment variable as instructed and reboot.

0

Done using the option in Settings>Terminal but still getting the error, tried also by  windows menus

0

You need to do it on Windows and reboot. It should work in the command line outside of the IDE.

Ask on flutter forums for help.

0

Please sign in to leave a comment.