Get Started
About 492 wordsAbout 2 min
2025-01-25
Get Source Code
You can refer to KitX Get Started to clone the main repository, and then develop in the KitX Clients/KitX Mobile
folder
Or, you can directly clone the KitX Mobile
repository
git clone git@github.com:Crequency/KitX-Mobile.git
Build a project
Preparation before compilation
Install Flutter SDK
You can refer to Official Document
Android Studio is fully installed without Android and provides Android platform support
There is no need to install Android Studio. Full installation provides Android platform support. You can choose other editors, such as: Visual Studio Code
However, due to the incomplete official website, this tutorial will teach you how to use the Android SDK command line tool to provide Android platform support
Install the Android SDK command line tool
Download the installation package at here and refer to here Complete the installation
Run the following command in the
cmdline-tools\<version>\bin
directorysdkmanager "platform-tools" "platforms;android-33" "build-tools;33.0.1"
Check if your SDK directory is roughly as follows
path/to/android/sdk ├─build-tools │ └─33.0.1 ├─cmdline-tools │ └─latest │ ├─bin │ └─lib ├─platform-tools └─platforms └─android-33
Detection environment
Run the flutter doctor -v
command to check whether the following items pass ([✓]
[!]
is OK)
- Flutter
- Android toolchain - develop for Android devices
Get Packages
Switch the directory to KitX Clients/KitX Mobile/kitx_mobile
, and then run flutter pub get
Tips
After making any changes to pubspec.yaml
, you must re-acquire Packages
Note
The next tutorial will default to the kitx_mobile
directory
Run/Debug
Please use a data cable to connect the phone first and ensure that the adb debugging function is normal
For information about adb debugging functions, you can refer to here
Warning
Please Always use real machines for running/debugging, any emulator may have unpredictable problems
Tips
It is recommended to use the editor to debug the application to provide more features
Note
If garbled code appears during compilation, just set the environment variable GRADLE_OPTS
to -Dfile.encoding=UTF-8
Run/Debug using the editor
Run/Debug with Visual Studio Code
Open the project directory, open the kitx_mobile/lib/main.dart
file, press Ctrl
+ F5
key to run, F5
key to debug
Run/Debug with Android Studio
TODO
Run with the command line
Just run flutter run
Compilation
Compile for Android
Just run flutter build apk
Use flutter build apk --split-per-abi
to compile a package with smaller single files but only one ABI
Compile for iOS
TODO
Other construction methods
You can also use some IDEs to build your project For example:
- Android Studio
Alternatively, you can configure an editor to simplify the build steps For example:
- Visual Studio Code
- Vim
The steps to configure the editor are omitted here, please search for relevant tutorials by yourself
Changelog
Last Updated: View All Changelog
💾 Feat: Updating translation for English
On 2/8/25💾 Feat(Plume-Theme): Migrated
On 1/25/25📝 Chore: Remove hard-coded permalink
On 1/25/25📦 Struct: Move to
On 1/25/25notes
folder to match theme's requirements📦 Struct: Move default to root dir
On 2/21/23📄 Docs: 新增移动端文档
On 1/25/23