Reputation: 873
I've compile the android source source ./build/envsetup.sh lunch aosp_x86_64-eng
when I run emulator64-x86 in terminal, error occur:
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.7' not found (required by emulator64-x86)
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by emulator64-x86)
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by emulator64-x86)
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by emulator64-x86)
I've found qt in
/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/
this directory include libQt5Core.so.5.7, libQt5Widgets.so.5.7 etc.
but libQt5Core.so in
/usr/lib/x86_64-linux-gnu/
version is 5.5
I've tried to set LD_LIBRARY_PATH to:
/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/
but the error still occur.
Copying the libQt5Core.so.5 to
/usr/lib/x86_64-linux-gnu/
will solve this error, but qt platform plugin libqxcb won't work.
How I can change the lib path to the
/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64
when I run emulator64-x86?
Upvotes: 4
Views: 19636
Reputation: 1
I got some problems with same problem. When included second lib I have got "qt not found".
Primary code added to .pro
#Add Crypto lib
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../../../usr/lib/x86_64- linux-gnu/release/ -lcrypto++
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../../../usr/lib/x86_64-linux-gnu/debug/ -lcrypto++
else:unix: LIBS += -L$$PWD/../../../usr/lib/x86_64-linux-gnu/ -lcrypto++
INCLUDEPATH += $$PWD/../../../usr/include/cryptopp
DEPENDPATH += $$PWD/../../../usr/include/cryptopp
I solved problem to change path like first ribary have and save last words "-lcrypto++"
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../build-ViCore- Desktop_Qt_5_13_1_GCC_64bit-Debug/release/ -lcrypto++
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../build-ViCore- Desktop_Qt_5_13_1_GCC_64bit-Debug/debug/ -lcrypto++
else:unix: LIBS += -L$$PWD/../build-ViCore-Desktop_Qt_5_13_1_GCC_64bit-Debug/ -lcrypto++
INCLUDEPATH += $$PWD/../build-ViCore-Desktop_Qt_5_13_1_GCC_64bit-Debug
DEPENDPATH += $$PWD/../build-ViCore-Desktop_Qt_5_13_1_GCC_64bit-Debug
Upvotes: 0
Reputation: 299
For me what works was copying all android internal qt libs to system qt libs folder cp -a $ANDROID_HOME/emulator/lib64/qt/lib/. /usr/lib/x86_64-linux-gnu/
Upvotes: 0
Reputation: 8311
Leave libQt5Core.so.5
in /home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/
. Qt does not like to be moved around, it makes it lose where the plugins are stored. In your case it might end up trying to load Qt 5.5 plugins.
Set LD_LIBRARY_PATH
to /home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/
.
Use ldd
to check which library will be used when running.
Also note that qxcb requires X11 to run.
Upvotes: 6