简体   繁体   中英

Flutter problem with plugins and app release

I'm fairly new to flutter but have been developing an app for a school project for about 3 months. The project being almost finished, I tried to run it in --release but got a lot of errors. I found out that the biggest part of the problem was due to the inability of many plugins to locate my Android SDK, so I added a local.properties file with sdk.dir to those plugins. It solved my problem but I am still wondering if there's a way to make the plugins automatically find the path to my Android SDK and also, to add the plugins to my project (instead of being in another directory) so that it works for everybody that clones my project. Thank you for your help!

Have everyone set an environment variable that points to their Android home like:

ANDROID_HOME=C:\Users\yourusername\AppData\Local\Android\Sdk (or equivalent location/path on MacOS, Linux)

That should be all you all have to do (no local.properties with sdk.dir is required).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM