参与别人flutter项目踩坑填坑记录,零散报错以及经历的解决方法。初次接触企业级项目,有些配置之类的和自己玩的不太一样,还有些依赖,以及一些配置项的规范化,版本的规定等可能导致自己在运行中出现环境冲突的问题。
1 | .java使用或覆盖了已过时的 API。 |
临时解决方案:在工程build.gradle里面找到allprojects加入如下代码:
1 | gradle.projectsEvaluated { |
解决方法:
1 | Could not determine the dependencies of task ':app:preDebugBuild |
flutter clean1 | FAILURE: Build failed with an exception. |
尝试解决方法:
运行flutter clean和flutter pub cache repair:效果,出现下一个问题情况
解决方案:
flutter clean1 | pub get failed (66; Could not decompress gz stream Connection closed while receiving |
flutter clean和flutter pub cache repair,然后翻墙后导致的问题1 | Error: ADB exited with exit code 1 |
1 | FlutterLoader( 4962): Flutter initialization failed. |
原因:所安装的虚拟机的系统架构问题,x86架构和arm64架构
解决方法:
下载对应的架构虚拟机,如果没有就只能用真机
build.gradle添加配置
1 | android { ... defaultConfig { .... ndk { abiFilters 'armeabi-v7a', 'x86' } } |
效果:可行
发现时间:2020.11.12
更新时间:2020.11.12
1 | Analyzing dependencies |
1 |
|
1 | Error connecting to the service protocol: failed to connect to |
参与别人flutter项目踩坑填坑记录,零散报错以及经历的解决方法。初次接触企业级项目,有些配置之类的和自己玩的不太一样,还有些依赖,以及一些配置项的规范化,版本的规定等可能导致自己在运行中出现环境冲突的问题。
1 | .java使用或覆盖了已过时的 API。 |
临时解决方案:在工程build.gradle里面找到allprojects加入如下代码:
1 | gradle.projectsEvaluated { |
解决方法:
1 | Could not determine the dependencies of task ':app:preDebugBuild |
flutter clean1 | FAILURE: Build failed with an exception. |
尝试解决方法:
运行flutter clean和flutter pub cache repair:效果,出现下一个问题情况
解决方案:
flutter clean1 | pub get failed (66; Could not decompress gz stream Connection closed while receiving |
flutter clean和flutter pub cache repair,然后翻墙后导致的问题1 | Error: ADB exited with exit code 1 |
1 | FlutterLoader( 4962): Flutter initialization failed. |
原因:所安装的虚拟机的系统架构问题,x86架构和arm64架构
解决方法:
下载对应的架构虚拟机,如果没有就只能用真机
build.gradle添加配置
1 | android { ... defaultConfig { .... ndk { abiFilters 'armeabi-v7a', 'x86' } } |
效果:可行
发现时间:2020.11.12
更新时间:2020.11.12
1 | Analyzing dependencies |
1 |
|
1 | Error connecting to the service protocol: failed to connect to |