Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate生成APK报错了 #1

Open
aceip opened this issue Apr 10, 2020 · 2 comments
Open

generate生成APK报错了 #1

aceip opened this issue Apr 10, 2020 · 2 comments

Comments

@aceip
Copy link

aceip commented Apr 10, 2020

这是完整的报错截图
Build command failed.
Error while executing process D:\Android\sdk\cmake\3.10.2.4988404\bin\ninja.exe with arguments {-C C:\Users\Administrator\Desktop\MyCop\PlayerAndPusher\audio.cxx\cmake\release\arm64-v8a native-lib}
ninja: Entering directory `C:\Users\Administrator\Desktop\MyCop\PlayerAndPusher\audio.cxx\cmake\release\arm64-v8a'
[1/10] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/AudioChannel.cpp.o
clang++: warning: argument unused during compilation: '-LC:/Users/Administrator/Desktop/MyCop/PlayerAndPusher/audio/src/main/cpp/libs/arm64-v8a' [-Wunused-command-line-argument]
[2/10] Building C object src/main/cpp/librtmp/CMakeFiles/rtmp.dir/log.c.o
[3/10] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/VideoChannel.cpp.o
clang++: warning: argument unused during compilation: '-LC:/Users/Administrator/Desktop/MyCop/PlayerAndPusher/audio/src/main/cpp/libs/arm64-v8a' [-Wunused-command-line-argument]
[4/10] Building C object src/main/cpp/librtmp/CMakeFiles/rtmp.dir/parseurl.c.o
[5/10] Building C object src/main/cpp/librtmp/CMakeFiles/rtmp.dir/hashswf.c.o
[6/10] Building C object src/main/cpp/librtmp/CMakeFiles/rtmp.dir/amf.c.o
[7/10] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o
clang++: warning: argument unused during compilation: '-LC:/Users/Administrator/Desktop/MyCop/PlayerAndPusher/audio/src/main/cpp/libs/arm64-v8a' [-Wunused-command-line-argument]
[8/10] Building C object src/main/cpp/librtmp/CMakeFiles/rtmp.dir/rtmp.c.o
[9/10] Linking C static library src\main\cpp\librtmp\librtmp.a
[10/10] Linking CXX shared library ........\build\intermediates\cmake\release\obj\arm64-v8a\libnative-lib.so
FAILED: ../../../../build/intermediates/cmake/release/obj/arm64-v8a/libnative-lib.so
cmd.exe /C "cd . && D:\Android\SDK\ndk\21.0.6113669\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=D:/Android/SDK/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=D:/Android/SDK/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/sysroot -fPIC -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -LC:/Users/Administrator/Desktop/MyCop/PlayerAndPusher/audio/src/main/cpp/libs/arm64-v8a -O2 -DNDEBUG -Wl,--exclude-libs,libgcc_real.a -Wl,--exclude-libs,libatomic.a -static-libstdc++ -Wl,--build-id -Wl,--fatal-warnings -Wl,--no-undefined -Qunused-arguments -shared -Wl,-soname,libnative-lib.so -o ........\build\intermediates\cmake\release\obj\arm64-v8a\libnative-lib.so CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o CMakeFiles/native-lib.dir/src/main/cpp/VideoChannel.cpp.o CMakeFiles/native-lib.dir/src/main/cpp/AudioChannel.cpp.o src/main/cpp/librtmp/librtmp.a -lx264 -lfaac -llog -latomic -lm && cd ."
D:/Android/SDK/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lx264
D:/Android/SDK/ndk/21.0.6113669/toolchains/llvm/prebuilt/windows-x86_64/lib/gcc/aarch64-linux-android/4.9.x/../../../../aarch64-linux-android/bin\ld: cannot find -lfaac
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
生成debug的apk都没问题 但生成release的APK就报错了 啥原因?

@zhujiang521
Copy link
Owner

在ndk的module中的gradle中忘了配置release包的ndk,配置完成之后就可以了。项目已修改,可以直接下载进行使用

@aceip
Copy link
Author

aceip commented Apr 13, 2020

共勉 辛苦了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants