can anyone let me know the differences between

 flutter build aar --no-debug --no-profile

and

flutter build aar --release
  1. i only want a release one.
--[no-]debug                    Build a debug version of the current project.
                                    (defaults to on)
--[no-]profile                  Build a version of the current project specialized for performance profiling.
                                    (defaults to on)
--[no-]release                  Build a release version of the current project.

2.i have read the documentation above,and i think both the commands above will produce a release aar only,but it's not. the command with "no" is right,and the second one will produce debug、profile、and release. 3. i have read this issue flutter build aar --release ,--release not work and it was closed with this unsatisfactory answer https://github.com/flutter/flutter/issues/47762#issuecomment-582223344 and this way new question comes out "differences between flutter build aar and flutter build aar --release"


Solution 1: 李永峰

right, sorry - by default it builds all variants. so build aar --release and build aar do the same thing. You need to disable debug and profile with build aar --no-profile --no-debug

https://github.com/flutter/flutter/issues/115051#issuecomment-1309706377