使用snapcraft为Linux快照程序包构建flutter应用程序时发生错误

问题描述

我有一个使用Flutter桌面的应用程序。在运行Flutter run -d linux或Flutter build Linux时,它可以完美地工作。我可以将其设置为snapcraft.yaml中的源,并将其设置为GitHub存储库,但是,一旦我尝试从本地源中将其捕获,就会出现以下错误

[ +543 ms] CMake Error: The current CMakeCache.txt directory /root/parts/lizard/build/build/linux/release/CMakeCache.txt is different than the
directory /home/username/development/Flutter_dev/lizard/build/linux/release where CMakeCache.txt was created. This may result in binaries being
created in the wrong place. If you are not sure,reedit the CMakeCache.txt
[   +2 ms] CMake Error: The source "/root/parts/lizard/build/linux/CMakeLists.txt" does not match the source
"/home/username/development/Flutter_dev/lizard/linux/CMakeLists.txt" used to generate cache.  Re-run cmake with a different source directory.

这是我的snapcraft.yaml文件

name: lizard-game
title: Lizard
base: core18 
version: '0.7'
summary: summary
description: description

grade: stable
confinement: strict

parts:
  lizard:
    plugin: Flutter
    source: .
    source-type: local
    Flutter-target: lib/main.dart
apps:
  lizard:
    command: lizard
    extensions: [Flutter-dev]
icon: ./assets/icon/icon.png

我还运行了Flutter create ..来尝试重新创建Linux文件夹。

您对我该有什么建议?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...