Skip to content

nicholasrr/t4g-apptracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

T4G

A new Flutter project.

Getting Started

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Requirements to run the APP

Setup

  • Install Java SDK, and it should automatically add to your user PATH its bin: alt text
    • Not needed if the step above is set correctly, but in case you have different JDK versions, you might need to do
    • flutter config --jdk-dir PATH_TO_JDK
        The Java Development Kit (JDK) installation directory. If unset, flutter
            will search for one in the following order:
            1. the JDK bundled with the latest installation of Android Studio,
            2. the JDK found at the directory found in the JAVA_HOME environment
            variable, and
            3. the directory containing the java binary found in the user's path.
    
  • Install Android Studio
    • Add SDK, and Command-Tools to System Environment PATH, like this: alt text
    • In Android Studio install Command-Tools in the SDK Manager: alt text alt text
  • Download and unzip the flutter SDK
    • Create a directory in your user folder "C:\Users\{username}" and move the unzipped SDK to there
    • Update your System PATH variable with the added flutter SDK as: alt text
  • In the project folder accept the Android licenses with flutter doctor --android-licenses
  • Type flutter doctor and check if you see the same, ignore the error on this one. alt text

Steps can also be found here:

Steps to sync libraries

  • flutter pub get : gets newly added packages
  • flutter pub outdated : refreshes outdated dependencies
  • flutter pub upgrade : upgrade locked outdated dependencies

Build and generate files

  • When models are created/modified: flutter packages pub run build_runner build

Creating an emulated phone

  • Click on Create Android Emulator in Android Studio alt text
  • Create a Virtual Device by clicking on the plus sign alt text, then select the one you want.
  • Back in VS Code click on the bottom right alt text and you should see alt text, click on the Emulator you created in Android Studio and it should start the emulator.
  • alt text
  • alt text

Running the app in your phone

Step 1: Connect Your Phone

  1. Connect your Android phone to your computer using a USB cable.
  2. Enable Developer Options and USB Debugging on your phone:
  3. Go to Settings > About Phone and tap Build Number 7 times to enable Developer Options.
  4. Go to Settings > Developer Options and enable USB Debugging.

Step 1.1: Using the emulated device

  • In the code, right click on main.dart and select Run Without Debugging, the app should now run on the emulated device.

alt text

Step 2: Verify Device Connection

  1. Open a terminal in Visual Studio Code or your system terminal.
  2. Run the following command to check if your device is connected: flutter devices
  3. Your device should appear in the list. If it doesn't, ensure USB Debugging is enabled and your USB drivers are installed.

Step 3: Build the APK

  1. Run the following command to build the .apk file: flutter build apk --release This will generate the .apk file in the build/app/outputs/flutter-apk/ directory of your project.

Step 4: Install the APK on Your Phone

  1. Once the .apk is built, you can install it directly on your connected device using: flutter install This will automatically install the app on your phone.

Step 5: Run the App

After installation, you can open the app on your phone and test it.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •