本文翻译自: Troubleshooting · miguelpruivo/flutter_file_picker Wiki · GitHub
版本: file_picker 4.3.3
Android
🐛 问题:
应用在发布模式下无法编译。
🛠 可能的解决方案:
请参考 #545,这里有一个相关的讨论,特别在此评论 你可能会发现一个解决方案。
🐛 问题:
如果遇到了如下的问题:
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin file_picker...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'file_picker'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
🛠 可能的解决方案:
这可能是由于从旧工程迁移的模式有问题或者需要完整迁移到 Android X 支持。可以参考该官方指导或在该包的仓库中搜索相关的问题,然后你会找到一些不同的解决方案(因为不同的人有不同的版本)。这里有一个很详细的说明。
请不要由于编译兼容问题新建 issue ,因为在仓库中有很多类似的解决,你可以很容易地找到一个解决方案。
🐛 问题:
编译失败,带有信息 unexpected e