PaddlePaddle / Paddle-Lite-Demo

lib, demo, model, data
Apache License 2.0
684 stars 286 forks source link

yolov5n_detection_demo 打包Android APP #359

Open leigao-dev opened 1 year ago

leigao-dev commented 1 year ago

yolov5n_detection_demo win10环境下进行 打包编译为Android APP报错如下 ld: error: found local symbol '_edata' in global part of symbol table in file D:/lkkj/Paddle-Lite-Demo/object_detection/android/app/cxx/yolov5n_detection_demo/app/src/main/cpp/../../../PaddleLite/cxx/libs/arm64-v8a/libpaddle_light_api_shared.so

qili93 commented 9 months ago

您好,请问您能提供下lite的版本吗?我们尝试定位下,谢谢!

LinasEin commented 9 months ago

Hi, I have the same error with ocr demo on Android.

My settings: (Paddle-Lite-Demo cloned today) Also running under win10 environment Paddle: paddle_lite_libs_v2_10_rc OpenCV: opencv-4.2.0-android-sdk NDK: 26.1.10909125 CMake: 3.22.1

I first ran the bellow lines before gradle build following your guidelines.

cd Paddle-Lite-Demo/libs
# 下载所需要的 Paddle Lite 预测库
sh download.sh
cd ../ocr/assets
# 下载OPT 优化后模型、测试图片、标签文件及 config 文件
sh download.sh
cd ../android/app/c++/ppocr_demo
# 将预测库、模型等资源文件拷贝到当前工程中
sh prepare.sh
# 用 Android Studio 打开 ppocr_demo 工程, 完成APP编译和运行

The only change I made was to build.gradle file where I specifically specified my NDK version (otherwise build fails with 'NDK 21.1.6352462 did not have a source.properties file' error):

android { ndkVersion '26.1.10909125' ... }