Build Flutter Apk On Android and iOS
Build Flutter Apk On Android and iOS
Build Flutter Apk On Android and iOS
https://f-droid.org/repo/com.termux_118.apk
Now install Ubuntu in termux using proof given here
https://wiki.termux.com/wiki/PRoot
Or run following commands
micro /etc/sudoers
On line number 45 add
anil ALL=(ALL:ALL) ALL
Ctrl+s and Ctrl+q to save and exit
su - anil
sudo apt update
mkdir android_sdk
cd android_sdk
Now download cmdline-tools from android.com
wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip
unzip commandlinetools-linux-8512546_latest.zip
cd cmdline-tools
mkdir latest
mv NOTICE.txt latest
mv lib latest
mv bin latest
mv source.properties latest
cd latest/bin
./sdkmanager --install "build-tools;33.0.0" "platforms;android-33"
Accept license by pressing y
Now download android build tools for arm64 device =>
cd
wget
https://github.com/lzhiyong/android-sdk-tools/releases/download/33.0.3/android-sdk-tools-static-
aarch64.zip
unzip sdk-tools-static-aarch64.zip
cd sdk-tools-aarch64/build-tools
cp * /home/anil/android-sdk/build-tools/33.0.0
cd
cd android-sdk
cp licenses /usr/lib/android-sdk
cp platforms /usr/lib/android-sdk
cd build-tools
cp 33.0.0 /usr/lib/android-sdk/build-tools
cd
cd myapp/android
gradle
gradle assembleDebug
It will show aapt2-something-linux.jar error now run=>
find . -name "aapt2-*-linux.jar"
Copy this output somewhere
cd
cd sdk-tools-aarch64/build-tools
cp aapt2 paste the path you copied now delete last name of file just paste the path
Now goto path you copied & run =>
jar -uvf aapt2-7.2.0-7984345-linux.jar aapt2
cd
cd myapp/android
gradle clean
gradle assembleDebug
It will show build success
cd ..
cd /home/anil/myapp/build/app/outputs/apk/debug
python3 -m http.server
Goto http://0.0.0.0:8000/
Download app-debug.apk and install t7he app.
cd
wget -O- https://aka.ms/install-vscode-server/setup.sh | sh
code-server serve-local