-
Notifications
You must be signed in to change notification settings - Fork 0
Home
First, update and upgrade your system packages:
sudo apt-get update && sudo apt-get upgrade
Install Gradle, which is essential for building your Android project:
sudo apt-get install gradle
Create a directory for the Android SDK:
cd ~
mkdir android-sdk
cd android-sdk
Download the Command Line Tools for Linux:
Get latest via https://developer.android.com/studio
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
Unzip the downloaded file:
unzip commandlinetools-linux-11076708_latest.zip
rm commandlinetools-linux-11076708_latest.zip
Move everything inside cmdline-tools
to cmdline-tools/latest
:
mkdir -p cmdline-tools/latest
mv cmdline-tools/* cmdline-tools/latest/
Update your PATH environment variable to include the Android SDK tools:
export PATH="$PATH:/home/codespace/android-sdk/cmdline-tools/latest/bin"
Add this line to ~/.bashrc
to make the change persistent:
echo 'export PATH="$PATH:/home/codespace/android-sdk/cmdline-tools/latest/bin"' >> ~/.bashrc
source ~/.bashrc
Install the necessary Android SDK components:
yes | sdkmanager "platform-tools" "platforms;android-34" "build-tools;34.0.0"
yes | sdkmanager --licenses
Navigate to your project directory:
cd /workspaces/Chatty
Create a local.properties
file to point to the Android SDK:
echo "sdk.dir=/home/codespace/android-sdk" > local.properties
Create a keystore.properties
file for the release signing configuration:
cat <<EOL > keystore.properties
STORE_FILE=/workspaces/Chatty/chatty.keystore
STORE_PASSWORD=
KEY_ALIAS=
KEY_PASSWORD=
EOL
Create an env.properties
file for environment-specific configurations:
cat <<EOL > env.properties
SERVER_URL_DEBUG=http://127.0.0.1
SERVER_URL_RELEASE=https://chatty-placeholder.com
EOL
Note: Ensure you place the chatty.keystore
file in the project root directory.
To generate a debug APK, run:
./gradlew assembleDebug
To generate a release APK, run:
./gradlew assembleRelease
Just a Rough Document for a Quick Overview in Case I Forget