[Share Experiences] Deepin20.2.4 在线安装qt6.2
Tofloor
poster avatar
徐俊
deepin
2021-10-17 05:34
Author

 

摘要:Deepin20.2.4环境下在线安装qt6.2的操作记录

标签:Deepin qt android

1.     下载Qt在线安装器

下载URL

https://download.qt.io/official_releases/online_installers/qt-unified-linux-x86_64-4.1.0-online.run

2.     安装c++/gdb/java

sudo apt update

sudo apt upgrade

sudo apt -y install build-essential libgl1-mesa-dev gdb default-jdk

 

3.     安装libxcb-util1

下载URL

        https://packages.debian.org/bullseye/amd64/libxcb-util1/download

下载文件:

        libxcb-util1_0.4.0-1+b1_amd64.deb

安装命令:

        sudo dpkg-deb -xv libxcb-util1_0.4.0-1+b1_amd64.deb /

实际安装目录为:

        /usr/lib/x86_64-linux-gnu/

 

4.     安装Android SDK

 

(1)在应用商店安装Android Studio

(2)启动Android Studio在Configure/SDK Manager下安装sdk/ndk/arm8/

SDK Platforms

        Android API 31

                Android SDK Platform 31

                Google APIs arm 64 v8a System Image

                Google APIs Intel x86 Atom_64 System Image

        Android11.0(R)

                Android SDK Platform 30

        Android7.0(Nougat)

                ARM 64 v8a System Image

SDK Tools

        Android SDK Build-Tools 31

                30.0.2

        NDK(Side by sidy)

                21.3.6528147

        Android SDK Command-line Tools(latest)

                Android SDK Command-line Tools(latest) 5.0

        Android Emulator            30.8.4

        Android SDK Platform-Tools 31.0.3

 

5.     安装qt

 

先准备好Qt的账号,安装过程中要用到。

./qt-unified-linux-x86_64-4.1.0-online.run

安装路径:

        ~/Qt

安装选项:

Qt

        Qt 6.2.0

                Desktop gcc 64-bit

                WebAssembly(TP)

                Android

                Sources

                Qt Quick 3D

                Qt Wayland Compositor

                Qt5 Compatibility Module

                Qt Shader Tools

                Additional Libraries

                        All…

                Qt Debug Information

                Qt Quick Timeline

        Developer and Designer Tools

                QtCreator 5.0.2

                Qt Installer Framework 4.1

                CMake 3.21.1

                Conan 1.33

                Ninja 1.10.2

 

6.     配置cmake

sudo ln -s ~/Qt/Tools/CMake/bin/cmake /usr/bin/cmake

 

7.     修补输入法

sudo cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so ~/Qt/Tools/QtCreator/lib/Qt/plugins/platforminputcontexts/

 

8.     下载android_openssl

https://github.com/KDAB/android_openssl/tree/openssl_1_1_1k

下载zip包文件:android_openssl-master.zip

解压到~/Android/Sdk/目录下

 

9.     配置Qt默认版本为Qt6

检查Qt版本选项:

qtchooser –l

增加Qt6版本选项:

qtchooser -install qt6 /home/xman/Qt/6.*/gcc_64/bin/qmake

配置/etc/profile,在末尾增加:

export QT_SELECT=qt6

export QTDIR=/home//Qt/

#注:替换为实际用户

export PATH=$QTDIR/6.*/gcc_64/bin:$PATH

export LD_LIBRARY_PATH=$QTDIR/6.*/gcc_64/lib:$LD_LIBRARY_PATH

 

10.  Qt中配置Android开发环境

打开菜单工具/选项,在设备/Android配置页中

1)配置Java

JDK路径:

                /usr/lib/jvm/java-11-openjdk-amd64/

2)配置Android SDK

Android SDK路径:

                ~/Android/Sdk

Android NDK清单:

                ~/Android/Sdk/ndk/21.3.6528147

3)配置Android OpenSSL

OpenSSL库路径:

                ~/Android/Sdk/android_openssl

 

 

 

Reply Favorite View the author
All Replies
sammy-621
deepin
2021-10-17 06:06
#1

下载与安装QT的环节,还是需要账号密码的,在这之前需要在官网注册一个

Reply View the author
徐俊
deepin
2021-10-17 09:00
#2
sammy-621

下载与安装QT的环节,还是需要账号密码的,在这之前需要在官网注册一个

没错,已修改,感谢提醒

Reply View the author
神末shenmo
deepin
Spark-App
Q&A Team
2021-10-17 19:47
#3

可以把github.com换成hub.fastgit.org

Reply View the author
fslong
deepin
2021-10-17 22:22
#4

我是直接pyside6,很香。

Reply View the author
绍贝格尔
deepin
2021-11-03 01:10
#5

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project 'android-build'.

Could not resolve all artifacts for configuration ':classpath'.
Could not find com.android.tools.build:gradle:4.1.3.
Searched in the following locations:

  • https://maven.aliyun.com/repository/jcenter/com/android/tools/build/gradle/4.1.3/gradle-4.1.3.pom project :
  • 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 525ms
Building the android package failed!

这是缺少什么东西吗

Reply View the author
坐井观天下
deepin
2022-05-20 13:53
#6

别的没问题,就是修补输入法不成功,qtcreator仍然不能输入汉字

Reply View the author