In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge of this article "how to build the Android packaging environment under linux", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to build Android packaging environment under linux" article.
Construction of Android Packaging Environment under linux
1. Required software installation package
Jdk installation package download: link: https://pan.baidu.com/s/1aUZyK3wfMmzB3g8wihUcEQ extraction code: 0sdf fullter installation package download link: https://pan.baidu.com/s/1exH3-ibS5AaliB8tf2eRxw extraction code: om41 gradle installation package download wget https://downloads.gradle-dn.com/distributions/gradle-5.6.4-all.zipSDK download installation link: https://pan.baidu.com/s/1rRod594rKzre5y0zrZo3Jg extraction code: 85xu
two。 Install jdk
Download the jdk installation package to / usr/local/
Cd / usr/local/tar zxvf jdk-8u191-linux-x64.tar.gz
3. Install git
Yum-y install git unzip zip# download version is too low to support. You need to upgrade yum-y install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpmyum-y update gitgit-- version.
4. Install SDK
Download the SDK installation package to / usr/local/
Cd / usr/local/unzip commandlinetools-linux-6200805_latest.zip-d / usr/localmkdir-p / usr/local/sdkcd / usr/local/cmdline-tools/bin./sdkmanager-- list-- sdk_root=/usr/local/sdk # shows the installable package. / sdkmanager-- install "platforms Android-29 "--sdk_root=/usr/local/sdk # install android-29./sdkmanager-- install" platform-tools "--sdk_root=/usr/local/sdk # install platform-tools./sdkmanager-- install" build-tools;29.0.3 "--sdk_root=/usr/local/sdk # install build-tools./sdkmanager-- install" cmdline-tools;latest "--sdk_root=/usr/local/sdk # install cmdline-tools
5. Install flutter
Cd / usr/localgit clone https://github.com/flutter/flutter.git-b stable
6. Install gradle
Cd / usr/localwget https://downloads.gradle-dn.com/distributions/gradle-5.6.4-all.zipunzip gradle-5.6.4-all.zipvim
7. Add environment variabl
Vim / etc/profile
Add
Export JAVA_HOME=/usr/local/jdk1.8.0_191export JRE_HOME=$JAVA_HOME/jreexport CLASSPATH=$CLASSPATH:.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jarexport ANDROID_HOME=/usr/local/sdkexport FLUTTER_HOME=/usr/local/flutterexport PUB_HOSTED_URL= https://pub.flutter-io.cnexport FLUTTER_STORAGE_BASE_URL= https://storage.flutter-io.cnexport GRADLE_HOME=/usr/local/gradle-5.6.4export PATH=$PATH:$GRADLE_HOME/binPATH=$ {JAVA _ HOME} / bin:$ {JRE_HOME} / bin:$ {ANDROID_HOME} / build-tools/29.0.3:$ {ANDROID_HOME} / cmdline-tools/latest/bin:$ {ANDROID_HOME} / platform-tools:$ {FLUTTER_HOME} / bin:$ {PATH}
Reset environment variabl
Source / etc/profile
8. Verification environment
Java-versionsdkmanager-versiongradle-version
9. Update SDK
Flutter doctor-android-licenses
9. Create a project
Mkdir-p / opt/project/democd / opt/projectfullter create demo
10. Flutter framework Android is packaged into apk
Cd / opt/project/demoflutter build apk
11. Normal Android project packaged apk
# for example, download a project test_androidcd test_android./gradlew: easy-preference:assembleReleasegradle assembleRelease above is about "how to build an Android Packaging Environment under linux". I believe everyone has a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about it, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.