git clone git@github.com:Vignana-Jyothi/vnr-campus-navigator.git
Open using Android studio (wait for the Gradle to build the project)
Run the app using Shift + F10
./gradlew build
./gradlew assembleDebug
This generates .apk file that you can transfer & install on your phone.
Note: this is small prototype to showcase idea. It has huge room for improvement. All the best in automating VNR Campus Navigation. Need more help?? More detailed instructions to run in linux or Windows can be found at the bottom of this page.
Annotations
- room_cards_tagger.py Use DrawRectangle with Control key to genrate rectangle coordinates. -
- appsrc/main/../MainActivity : Loads the room numbers & handles clicks & item selection
- HighlightView.kt :
- Contains the map details for each room.
- Handles Drawing & all business logic.
Not yet launched
- render.py : Loads college A-Block 2nd floor image & shows the tagged rooms.
- render.py is used to draw rectangle on image & identify coordinates.
- room_detection.py, custom_room_selector.py Detects room automatically. But not perfected yet.
Select a Room you want to go to. See it getting highlighted.
Change to different room by selecting it.
Show Room | Change Room |
---|---|
Click any room. It selects the room automatically.
Note: Only Few rooms are annotated. Other rooms may not work.
Ensure you have the following installed:
- JDK: Java Development Kit (version 11 or above is typically required for Android projects).
- Android SDK: Ensure Android Studio or the command-line tools are installed, and the
ANDROID_HOME
environment variable is configured. - Gradle: Install Gradle or use the Gradle wrapper (
gradlew
) included in the project.
Clone the project to your local machine:
git clone https://github.com/Vignana-Jyothi/vnr-campus-navigator.git
cd vnr-campus-navigator/android/app
Ensure the project has a Gradle wrapper (gradlew
and gradlew.bat
) in the root directory or the android/app
folder. If it exists, you don’t need to install Gradle manually.
- Make the wrapper executable (on Linux/macOS):
chmod +x ./gradlew
Download the necessary dependencies for the project:
./gradlew build
This will fetch all required dependencies and compile the project.
To build the APK file:
./gradlew assembleDebug
- The APK file will be generated in the following directory:
android/app/build/outputs/apk/debug/
For a release build:
./gradlew assembleRelease
If you want to install and run the application on a connected Android device or emulator:
-
Ensure a Device is Connected:
- Use
adb devices
to confirm your device is listed.
- Use
-
Run the App:
./gradlew installDebug
This installs the app on the connected device.
-
Launch the App:
adb shell am start -n com.vnr.campusnavigator/.MainActivity
Replace
com.vnr.campusnavigator
with the correct package name from the project if different.
-
Android SDK Not Found:
- Ensure the
ANDROID_HOME
environment variable is set and points to the Android SDK directory.
Example (Linux/macOS):
export ANDROID_HOME=/path/to/android-sdk export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
- Ensure the
-
Dependencies Missing:
- Ensure that all dependencies in the
build.gradle.kts
file are correctly synced.
- Ensure that all dependencies in the
Here’s how to run the project VNR Campus Navigator using Gradle on a Windows system:
Make sure you have the following installed on your Windows machine:
-
Java Development Kit (JDK):
- Download and install the JDK (11 or above) from Oracle or OpenJDK.
- Add the
JAVA_HOME
environment variable:- Go to System Properties > Advanced > Environment Variables.
- Add
JAVA_HOME
pointing to your JDK installation directory (e.g.,C:\Program Files\Java\jdk-17
). - Add
%JAVA_HOME%\bin
to your Path.
Verify installation:
java -version
-
Android SDK:
- Install Android Studio or Command Line Tools.
- Configure
ANDROID_HOME
:- Set
ANDROID_HOME
to the location of the Android SDK (e.g.,C:\Users\<YourUser>\AppData\Local\Android\Sdk
). - Add
%ANDROID_HOME%\platform-tools
and%ANDROID_HOME%\tools
to your Path.
- Set
Verify installation:
adb --version
-
Gradle (Optional):
- The project includes a Gradle wrapper (
gradlew
), so you don’t need to install Gradle manually. However, if you'd like to install Gradle globally, you can download it from Gradle.org.
- The project includes a Gradle wrapper (
- Open a terminal (e.g., Command Prompt or PowerShell).
- Clone the GitHub repository:
git clone https://github.com/Vignana-Jyothi/vnr-campus-navigator.git cd vnr-campus-navigator\android\app
The project includes the Gradle wrapper (gradlew.bat
), which allows you to run Gradle commands without installing Gradle globally.
To download and sync all required dependencies:
gradlew.bat build
To build the debug APK:
gradlew.bat assembleDebug
- The APK file will be located in:
vnr-campus-navigator\android\app\build\outputs\apk\debug\app-debug.apk
For a release APK:
gradlew.bat assembleRelease
-
Connect your Android device via USB or start an emulator:
- Use the
adb
command to confirm a connected device:adb devices
- Use the
-
Install the APK on the connected device:
adb install .\build\outputs\apk\debug\app-debug.apk
-
Launch the app:
adb shell am start -n com.vnr.campusnavigator/.MainActivity
Replace com.vnr.campusnavigator
with the correct package name if it’s different.
-
Environment Variables Not Set:
- Ensure
JAVA_HOME
andANDROID_HOME
are correctly configured under System Properties > Advanced > Environment Variables. - Verify with:
echo %JAVA_HOME% echo %ANDROID_HOME%
- Ensure
-
Gradle Errors:
- If
gradlew.bat
fails, delete the.gradle
folder in the project directory and re-run:del .gradle /S /Q gradlew.bat clean build
- If
-
SDK Version Errors:
- Open
build.gradle.kts
and ensure thecompileSdkVersion
matches the installed SDK version in your Android SDK.
- Open
With these steps, you should be able to build and run the project on your Windows system. Let me know if you need further assistance! 😊