Skip to content

jbaehr66/GoTouchThatGrass

Repository files navigation

Setting up IntelliJ IDEA Ultimate for Android Development:

  1. Install Android SDK:
    • If you haven't already, you'll need the Android SDK installed
    • In IntelliJ, go to File > Settings > Appearance & Behavior > System Settings > Android SDK
    • If SDK is not configured, click on the "+" button to download it or specify the path if already installed
    • Make sure you have Android SDK Platform tools, build tools, and at least one SDK platform installed
  2. Install Required Plugins:
    • Go to File > Settings > Plugins
    • Make sure the "Android" plugin is installed and enabled
    • You may also want to install "Android WiFi ADB" for wireless debugging

Opening and Configuring the Project:

  1. Open the Project: File > Open
  2. Navigate to /Users/johnbridges/Dropbox/NewHope Psychology/git/thirdparty/GoTouchThatGrass-3-main and click "Open"
  3. Wait for Gradle Sync:
    • IntelliJ will automatically sync the Gradle project files
    • This might take a few minutes the first time
  4. Configure SDK:
    • Go to File > Project Structure
    • Under Project Settings > Project, ensure the SDK is set correctly
    • Under Modules > app, make sure the module SDK matches the project SDK

Running the App:

  1. Set up an Android Virtual Device (AVD):
    • Go to Tools > AVD Manager (or Tools > Android > AVD Manager)
    • Click "Create Virtual Device"
    • Select a device (Pixel 6 recommended for testing)
    • Select a system image (API 30+ recommended)
    • Configure the AVD and click "Finish"
  2. Create a Run Configuration:
    • Go to Run > Edit Configurations
    • Click the "+" button and select "Android App"
    • Name your configuration (e.g., "app")
    • Under Module, select "app"
    • Click "OK" to save the configuration
  3. Run the App:
    • Select your run configuration from the dropdown in the toolbar
    • Click the green "Run" button or press Shift+F10
    • Select your emulator or connected device

Debugging and Testing:

  1. Debugging:
    • Set breakpoints in your code by clicking in the gutter next to line numbers
    • Run the app in debug mode by clicking the Debug button or pressing Shift+F9
    • Use the Debug tool window to inspect variables and step through code
  2. Logcat:
    • View app logs in the "Logcat" tool window
    • Filter logs by application package name: com.example.gotouchthatgrass_3

Connecting a Physical Device:

  1. Enable Developer Options and USB Debugging on your Android device (as described in my previous response)
  2. Connect your device:
    • Connect via USB
    • Or use WiFi ADB if you have the Android WiFi ADB plugin installed
  3. Select your device from the available devices dropdown and run the app

IntelliJ-Specific Tips:

  1. Gradle Tool Window:
    • Use the Gradle tool window (View > Tool Windows > Gradle) to run specific Gradle tasks like clean, build, etc.
  2. Layout Preview:
    • When editing XML layout files, use the Preview tab to see how layouts will appear on devices
  3. Memory Usage:
    • If IntelliJ seems slow, you may need to increase its memory allocation
    • Go to Help > Edit Custom VM Options and increase the values for Xmx (maximum heap size)

The project should now build and run from IntelliJ IDEA Ultimate just as it would in Android Studio. If you encounter any specific issues with IntelliJ, let me know and I can help troubleshoot.

About

GoTouchThatGrass

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages