英文:
Flutter Execution failed for task ':iris_method_channel:buildCMakeDebug[arm64-v8a]'
问题
由于以下异常,无法运行Flutter应用程序。
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':iris_method_channel:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/android/.cxx/Debug/2i83q535/arm64-v8a'
[1/2] Building CXX object CMakeFiles/iris_method_channel.dir/iris_event.cc.o
FAILED: CMakeFiles/iris_method_channel.dir/iris_event.cc.o
/home/muhammad/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/home/muhammad/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/muhammad/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DDART_SHARED_LIB -Diris_method_channel_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/iris_method_channel.dir/iris_event.cc.o -MF CMakeFiles/iris_method_channel.dir/iris_event.cc.o.d -o CMakeFiles/iris_method_channel.dir/iris_event.cc.o -c /home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc
In file included from /home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc:6:
/snap/flutter/current/usr/include/c++/9/memory:121:25: error: cast from pointer to smaller type 'uintptr_t' (aka 'unsigned int') loses information
const auto __intptr = reinterpret_cast<uintptr_t>(__ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc:90:17: error: use of undeclared identifier 'memcpy'; did you mean 'wmemcpy'?
memcpy(abuffer, obuffer, abufferLength);
^~~~~~
wmemcpy
/snap/flutter/current/usr/include/wchar.h:262:17: note: 'wmemcpy' declared here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
^
/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc:90:24: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'uint8_t *' (aka 'unsigned char *')
memcpy(abuffer, obuffer, abufferLength);
^~~~~~~
/snap/flutter/current/usr/include/wchar.h:262:46: note: passing argument to parameter '__s1' here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
^
3 errors generated.
ninja: build stopped: subcommand failed.
C++ build system [build] failed while executing:
/home/muhammad/Android/Sdk/cmake/3.18.1/bin/ninja \
-C \
/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/android/.cxx/Debug/2i83q535/arm64-v8a \
iris_method_channel
from /home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/android
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 18s
Exception: Gradle task assembleDebug failed with exit code 1
- iris_method_channel被agora_rtc_engine使用。
- 我使用的agora_rtc_engine版本是
^6.1.1
。 - 我也已经更新了Flutter,尝试了许多方法但没有结果。
英文:
Unable to run flutter app due to following exception.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':iris_method_channel:buildCMakeDebug[arm64-v8a]'.
> com.android.ide.common.process.ProcessException: ninja: Entering directory `/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/android/.cxx/Debug/2i83q535/arm64-v8a'
[1/2] Building CXX object CMakeFiles/iris_method_channel.dir/iris_event.cc.o
FAILED: CMakeFiles/iris_method_channel.dir/iris_event.cc.o
/home/muhammad/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/home/muhammad/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/muhammad/Android/Sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DDART_SHARED_LIB -Diris_method_channel_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/iris_method_channel.dir/iris_event.cc.o -MF CMakeFiles/iris_method_channel.dir/iris_event.cc.o.d -o CMakeFiles/iris_method_channel.dir/iris_event.cc.o -c /home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc
In file included from /home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc:6:
/snap/flutter/current/usr/include/c++/9/memory:121:25: error: cast from pointer to smaller type 'uintptr_t' (aka 'unsigned int') loses information
const auto __intptr = reinterpret_cast<uintptr_t>(__ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc:90:17: error: use of undeclared identifier 'memcpy'; did you mean 'wmemcpy'?
memcpy(abuffer, obuffer, abufferLength);
^~~~~~
wmemcpy
/snap/flutter/current/usr/include/wchar.h:262:17: note: 'wmemcpy' declared here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
^
/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/src/iris_event.cc:90:24: error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 'uint8_t *' (aka 'unsigned char *')
memcpy(abuffer, obuffer, abufferLength);
^~~~~~~
/snap/flutter/current/usr/include/wchar.h:262:46: note: passing argument to parameter '__s1' here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
^
3 errors generated.
ninja: build stopped: subcommand failed.
C++ build system [build] failed while executing:
/home/muhammad/Android/Sdk/cmake/3.18.1/bin/ninja \
-C \
/home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/android/.cxx/Debug/2i83q535/arm64-v8a \
iris_method_channel
from /home/muhammad/.pub-cache/hosted/pub.dev/iris_method_channel-1.1.0-rc.5/android
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 18s
Exception: Gradle task assembleDebug failed with exit code 1
-
iris_method_channel is used by agora_rtc_engine.
-
I am using
agora_rtc_engine: ^6.1.1
-
I have updated my flutter as well. Tried many things but no result
found
答案1
得分: 2
安装Flutter SDK手动(请参阅文档)解决了Ubuntu上的问题。
所有的功劳归功于这个答案。
英文:
Installing the Flutter SDK manually (see docs) resolved the issue in Ubuntu.
All the credit goes to this answer.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论