Mobile/Fennec/Android/IDEs: Difference between revisions

Jump to navigation Jump to search
Line 4: Line 4:
This is the direction that IDE support is moving towards.
This is the direction that IDE support is moving towards.


* First, build and package your tree:
# build and package your tree:
 
  ./mach build && ./mach package
  ./mach build && ./mach package
 
# Configure Gradle to build Fennec.  '''Do not skip this step: it configures your object directory for Gradle.'''
* Second, configure Gradle to build Fennec.  '''Do not skip this step: it configures your object directory for Gradle.'''
 
  ./mach gradle-install
  ./mach gradle-install
 
# Optionally, verify that Gradle can build Fennec:
* Optionally, verify that Gradle can build Fennec:
 
  ./mach gradle build
  ./mach gradle build
 
# Finally, import the newly created Gradle projects into IntelliJ/Android Studio:
* Finally, import the newly created Gradle projects into IntelliJ/Android Studio:
* ''File'' > ''Import Project...'' and select <tt>$OBJDIR/mobile/android/gradle</tt>, where <tt>$OBJDIR</tt> is your object directory.  (The correct directory is printed by the |mach gradle-install| command.)
** ''File'' > ''Import Project...'' and select <tt>$OBJDIR/mobile/android/gradle</tt>, where <tt>$OBJDIR</tt> is your object directory.  (The correct directory is printed by the |mach gradle-install| command.)
* Select ''Import project from external model'' > ''Gradle'' > ''Next''.
** Select ''Import project from external model'' > ''Gradle'' > ''Next''.
* Select ''Use customizable gradle wrapper'' > ''Finish''.
** Select ''Use customizable gradle wrapper'' > ''Finish''.
 
You should have a shiny new Gradle-based project in your IDE!  You'll need to configure your Android SDK:
You should have a shiny new Gradle-based project in your IDE!  You'll need to configure your Android SDK:
 
# ''File'' > ''Project Structure''
* ''File'' > ''Project Structure''
* Select ''Android API 21 platform'' for the Project SDK (or whatever is appropriate for your configuration).  You may be prompted to add a ''JAVA SDK'' first: your IDE should find a JDK 1.7 or 1.8 install automatically.
** Select ''Android API 21 platform'' for the Project SDK (or whatever is appropriate for your configuration); and
* Select ''7 - Diamonds, ARM, multi-catch etc.'' for the Project language level.
** Select ''7 - Diamonds, ARM, multi-catch etc.'' for the Project language level.


You should be all set!  Try it out by choosing ''Build'' > ''Rebuild project''.
You should be all set!  Try it out by choosing ''Build'' > ''Rebuild project''.
Confirmed users
355

edits

Navigation menu