flutter_pdf_render icon indicating copy to clipboard operation
flutter_pdf_render copied to clipboard

Can't build project

Open BigAppsAndroid1 opened this issue 3 years ago • 1 comments

Try to build for Android minSDK 24 When build project:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':pdf_render:externalNativeBuildDebug'.
> Build command failed.
  Error while executing process /snap/flutter/current/usr/bin/ninja with arguments {-C /home/dev/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.11/android/.cxx/cmake/debug/armeabi-v7a bbhelper}
  ninja: Entering directory `/home/dev/snap/flutter/common/flutter/.pub-cache/hosted/pub.dartlang.org/pdf_render-1.0.11/android/.cxx/cmake/debug/armeabi-v7a'
  [1/2] Building CXX object CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o
  FAILED: CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o 
  /home/dev/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=armv7-none-linux-androideabi21 --gcc-toolchain=/home/dev/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/home/dev/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot  -Dbbhelper_EXPORTS  -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security   -O0 -fno-limit-debug-info  -fPIC   -DBUILD_FOR_ANDROID -MD -MT CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o -MF CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o.d -o CMakeFiles/bbhelper.dir/c++/directBufferAndroid.cpp.o -c ../../../../c++/directBufferAndroid.cpp
  In file included from ../../../../c++/directBufferAndroid.cpp:1:
  In file included from /home/dev/Android/Sdk/ndk/21.4.7075529/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include/jni.h:28:
  In file included from /snap/flutter/current/usr/include/stdint.h:26:
  In file included from /snap/flutter/current/usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33:
  In file included from /snap/flutter/current/usr/include/features.h:448:
  /snap/flutter/current/usr/include/x86_64-linux-gnu/gnu/stubs.h:7:11: fatal error: 'gnu/stubs-32.h' file not found
  # include <gnu/stubs-32.h>
            ^~~~~~~~~~~~~~~~
  1 error generated.
  ninja: build stopped: subcommand failed.



* 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 17s
Exception: Gradle task assembleDebug failed with exit code 1

BigAppsAndroid1 avatar Jul 13 '21 07:07 BigAppsAndroid1

Are you working on Linux? If so, there seems an issue with flutter snap and here is the solution for it:

flutter/flutter - FAILURE: Build failed with an exception. <gnu/stubs-32.h>

espresso3389 avatar Jul 13 '21 08:07 espresso3389

This will help https://www.youtube.com/watch?v=gAUVz0U7eyA

myselfuser1 avatar Mar 17 '23 12:03 myselfuser1