0

I am using Android Studio to run Flutter. I have 8GB RAM, 256GB SSD. But whenever I am going to generate an apk file, it's taking an unlimited time. I have tried all possible command like:

flutter build apk --release
flutter build apk --split-per-abi
flutter build apk --build-name=1.0 --build-number=1

But still, the apk is not generating. It is showing:

    Building with sound null safety 
`Running Gradle task 'assembleRelease'...`                               \

What should I do?

3 Answers3

0

I have found something interesting here. After commanding mentioned command, if I do not close the terminal it's building nonstop. But if I close the terminal and let it go doing my other work, it executes very quickly. I do not know why, but it happens several times here for me.

  • I noticed something similar. I was starting the build process, then going off and doing some other task in another window which appears to be stalling the build process. I realised that if i start the build command then just back away (i didn't touch the keyboard or mouse after pressing enter to start the build) - the build then succeed quickly. Might be a fluke! – teh_raab Apr 04 '22 at 15:18
0

first use this command

flutter clean  

and then

flutter build apk --split-per-abi

this command is enough for generating all type apk

0

In my case, the problem was solved by deleting a large text file (approx. 25 MB). After that, build app was done without any problems. I had used this file to save some information through Getstorage package.