Development Tools

Android Studio User Guide

| Product: Android Studio

Overview

This guide provides comprehensive instructions for deploying and using the cloudimg Android Studio AMI on Amazon Web Services. The AMI delivers a fully preconfigured Windows Server instance with Android Studio installed and ready to use, allowing you to begin Android application development immediately after launch.

Android Studio is the official integrated development environment for Google's Android operating system. It is built on JetBrains' IntelliJ IDEA software and is designed specifically for Android development. With this cloudimg AMI, you can run Android Studio in the cloud, enabling remote development workflows, team collaboration, and access to scalable compute resources for building, testing, and debugging Android applications.

This AMI is ideal for developers who need a cloud based Android development environment, teams that require consistent development tooling across members, or organizations looking to centralize their development infrastructure on AWS.

For any issues encountered while following this guide, please contact support@cloudimg.co.uk.


Prerequisites

Before launching the Android Studio AMI, ensure you have the following in place.

AWS Account You need an active AWS account with permissions to launch EC2 instances, manage security groups, and access the AWS Marketplace.

EC2 Key Pair Create or identify an existing EC2 key pair in the region where you plan to launch the instance. This key pair is required to decrypt the Windows Administrator password after launch.

Security Group Prepare a security group that allows inbound RDP access. The required rule is outlined below.

Protocol Type Port Description
RDP TCP 3389 Remote Desktop Access

It is strongly recommended to restrict the source IP range for RDP access to your known IP addresses or corporate CIDR blocks rather than allowing access from 0.0.0.0/0.

Remote Desktop Client Install a Remote Desktop Protocol client on your local machine. Options include Microsoft Remote Desktop (available for Windows and macOS), Remmina (Linux), or any other RDP compatible client.

Minimum Instance Requirements

Minimum CPU Minimum RAM Required Disk Space
1 vCPU 1 GB 30 GB

While the minimum requirements above will allow the instance to run, a t3.medium or larger instance type is recommended for a comfortable development experience with Android Studio. Building and running Android emulators will benefit from additional CPU and memory resources.


Step by Step Setup

Follow the steps below to launch and connect to your Android Studio instance.

Step 1: Launch the Instance

  1. Log in to your AWS account and navigate to the AWS Marketplace.
  2. Search for the cloudimg Android Studio AMI.
  3. Select your desired instance type (t3.medium or larger is recommended).
  4. Choose your preferred region and VPC configuration.
  5. Select the EC2 key pair you created in the prerequisites.
  6. Assign the security group with RDP access on port 3389.
  7. Configure storage (30 GB minimum on the root volume).
  8. Launch the instance.

Step 2: Wait for Status Checks

After launching the instance, navigate to the EC2 console and wait for the instance to show 2/2 status checks passing. This ensures the instance has fully booted and Windows has completed its initial setup. This process typically takes between 3 and 10 minutes.

Step 3: Retrieve the Administrator Password

  1. Open the EC2 console in the AWS region where you launched the instance.
  2. Select Instances from the left navigation panel.
  3. Locate and select your newly launched instance.
  4. Click Actions at the top of the page.
  5. Navigate to Security and then select Get Windows password.
  6. Click Browse and upload the private key file (.pem) from the key pair you selected during launch.
  7. Click Decrypt password.
  8. Copy the decrypted password and store it securely. This is your Administrator password.

Step 4: Connect via Remote Desktop

  1. Open your Remote Desktop client application.
  2. Create a new connection using the public IP address of your EC2 instance (or the private IP if connecting through a VPN or from within the same VPC).
  3. Enter the following credentials when prompted:
  4. Username: Administrator
  5. Password: The decrypted value from Step 3
  6. If a certificate warning appears, click Continue to proceed. This is expected for new connections.
  7. You will be connected to the Windows Server desktop.

Step 5: Launch Android Studio

Once connected to the desktop, locate the Android Studio shortcut icon on the desktop and double click it to launch the application. Android Studio is preinstalled and ready for use immediately.


Server Components

The following software components are preinstalled on this AMI.

Component Version
Android Studio Latest

The AMI is built on Windows Server and includes the base operating system along with Android Studio preinstalled and configured. Android Studio includes the Android SDK, build tools, and the integrated development environment.


Filesystem Layout

The instance uses a single volume configuration.

Drive Purpose Minimum Size
C:\ Operating system and application 30 GB

Key directory locations on the instance:

Path Description
C:\Program Files\Android\Android Studio\ Android Studio installation directory
C:\Users\Administrator\Desktop\ Desktop with Android Studio shortcut
C:\Users\Administrator.android\ Android SDK and AVD configuration
C:\Users\Administrator\AndroidStudioProjects\ Default project workspace directory

If you need additional storage for large projects, Android emulator images, or build artifacts, you can attach an additional EBS volume through the AWS console and mount it as a secondary drive.


Managing the Application

Starting Android Studio

Double click the Android Studio icon on the Windows desktop. The application will launch and display the Welcome screen, from which you can create new projects, open existing projects, or configure SDK settings.

Updating Android Studio

Android Studio includes a built in update mechanism. To check for updates, open Android Studio, navigate to Help and then select Check for Updates. Follow the prompts to download and install any available updates.

Configuring the Android SDK

On first launch, Android Studio may prompt you to download additional SDK components. Use the SDK Manager (accessible from the Welcome screen or from Tools then SDK Manager within an open project) to install the Android SDK versions and build tools required for your development targets.

Setting Up the Android Emulator

To test applications on virtual devices, use the AVD Manager (accessible from Tools then AVD Manager). Create a new virtual device, select a device profile and system image, then launch the emulator. Note that running the Android emulator requires hardware virtualization support. Choose an instance type that supports this capability, such as metal instances or instances with nested virtualization.

Managing Multiple Projects

The default workspace directory is located at C:\Users\Administrator\AndroidStudioProjects. You can organize your projects within this directory or configure Android Studio to use a custom project directory.


Scripts and Logs

Android Studio Logs

Android Studio generates log files that are useful for diagnosing issues with the IDE itself.

Log Location Description
C:\Users\Administrator.AndroidStudio\system\log\idea.log Main Android Studio IDE log
C:\Users\Administrator.android\avd\ AVD (emulator) configuration

Windows Event Logs

For system level diagnostics, use the Windows Event Viewer. Press the Windows key, search for Event Viewer, and open it to review application and system logs.

Build Output

When building Android projects, build output and logs are stored within each project's directory under the build folder. Gradle build logs can be viewed in the Build output window within Android Studio.


Troubleshooting

Cannot connect via RDP

  • Verify that the instance has passed 2/2 status checks in the EC2 console.
  • Confirm that your security group allows inbound TCP traffic on port 3389 from your IP address.
  • Ensure you are using the correct public IP address. If the instance was stopped and started, the public IP may have changed unless you are using an Elastic IP.
  • Check that your local firewall or corporate network is not blocking outbound RDP connections.

Password decryption fails

  • Ensure you are uploading the correct .pem file that matches the key pair selected during instance launch.
  • The password may take up to 15 minutes to become available after the first launch. Wait and try again if the option is greyed out.

Android Studio runs slowly

  • Consider upgrading to a larger instance type with more CPU and RAM. A t3.large or t3.xlarge will provide a significantly better experience.
  • Close unnecessary applications running on the instance to free up resources.
  • Increase the heap size allocated to Android Studio by editing the VM options under Help then Edit Custom VM Options.

Android Emulator does not start

  • The Android emulator requires hardware virtualization. Ensure your instance type supports nested virtualization, or use a bare metal instance type.
  • Alternatively, use a physical Android device connected via ADB over the network for testing.

Insufficient disk space

  • Android SDK components, emulator images, and build caches can consume significant disk space. Monitor your C: drive usage regularly.
  • Attach an additional EBS volume for project files and build outputs to keep the system drive from filling up.
  • Clear the Gradle build cache by navigating to C:\Users\Administrator.gradle\caches\ and deleting old cache files.

RDP session disconnects frequently

  • Check your network connection stability.
  • Adjust the RDP client settings to reduce bandwidth requirements by lowering the display quality or disabling visual effects.
  • Ensure the instance is not running out of memory, which could cause Windows to become unresponsive.

Security Recommendations

Change the Administrator Password

After your first login, change the default Administrator password to a strong, unique password. Open the Windows command prompt or PowerShell and run:

net user Administrator YourNewStrongPassword

Note that once you change the password, the original decrypted password from the AWS console will no longer be valid.

Restrict RDP Access

Limit the security group rule for port 3389 to only your specific IP addresses or a trusted CIDR range. Avoid using 0.0.0.0/0, which would expose the instance to RDP brute force attacks from the entire internet.

Enable Windows Firewall Rules

Review and configure the Windows Firewall to restrict inbound and outbound traffic to only what is necessary for your development workflow.

Keep Software Updated

Regularly update Android Studio, the Android SDK, and Windows Server to ensure you have the latest security patches and bug fixes.

Use an Elastic IP

Assign an Elastic IP to your instance to maintain a consistent IP address across stop and start cycles. This also allows you to maintain consistent firewall rules.

Enable CloudWatch Monitoring

Configure Amazon CloudWatch to monitor your instance metrics such as CPU utilization, memory usage, and disk space. Set up alarms to notify you if resources are running low.

Backup Your Projects

Use AWS services such as EBS snapshots or S3 to regularly back up your project files and configurations. Consider integrating your projects with a version control system such as Git.

Use IAM Roles

If your development workflow involves accessing other AWS services (such as S3 or DynamoDB), attach an IAM role to the instance rather than storing AWS access keys on the server.


Support

If you encounter any issues not covered in this guide, the cloudimg support team is available to help.

  • Email: support@cloudimg.co.uk
  • Phone: (+44) 02045382725
  • Website: www.cloudimg.co.uk
  • Address: 3rd Floor, 86 90 Paul Street, London, EC2A 4NE

Support is available for any issues related to the AMI, including connectivity problems, software configuration, and general guidance on using the preconfigured environment.

When contacting support, please include your EC2 instance ID, the AWS region, and a description of the issue along with any relevant error messages or screenshots.