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?
Please sign in to leave a comment.
Please refer to https://docs.flutter.dev/deployment/android.
This is not IntelliJ IDEA specific question.
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
Set JAVA_HOME environment variable as instructed and reboot.
Done using the option in Settings>Terminal but still getting the error, tried also by windows menus
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.