Restoring Android Studio 3 AVD Manager: Difference between revisions

From PiRho Knowledgebase
Jump to navigationJump to search
Dex (talk | contribs)
Created page with "'''Summary:''' Android Studio 3.0 was designed around a 2017-era Android SDK. Attempting to use Android Studio 3.0 with modern SDK components can result in missing AVD Manager functionality, Gradle synchronization failures, emulator incompatibilities, and a generally unstable development environment. This article documents the investigation, diagnosis, reconstruction, and validation of a fully functional Android Studio 3.0 environment capable of running Android 8.0 Oreo..."
 
Dex (talk | contribs)
No edit summary
Line 1: Line 1:
'''Summary:''' Android Studio 3.0 was designed around a 2017-era Android SDK. Attempting to use Android Studio 3.0 with modern SDK components can result in missing AVD Manager functionality, Gradle synchronization failures, emulator incompatibilities, and a generally unstable development environment. This article documents the investigation, diagnosis, reconstruction, and validation of a fully functional Android Studio 3.0 environment capable of running Android 8.0 Oreo (API 26) virtual devices. == Symptoms == * Android Virtual Device (AVD) Manager missing or unavailable. * Android-specific tooling partially disabled. * Emulator installed but not fully integrated into Android Studio. * Gradle project synchronization failures. * Dependency resolution failures. * Modern SDK components installed alongside Android Studio 3.0. == Environment == === IDE === <pre> Android Studio 3.0.0 Build 171.4408382 </pre> === Operating System === <pre> Windows 10 </pre> === SDK Location === <pre> S:\Android\Sdk </pre> == Initial Observations == Although Android Studio appeared to function, the installed Android SDK contained components from wildly different generations. == Root Cause == The underlying issue was a version mismatch. Android Studio 3.0 expects components contemporary with its release period: <pre> 2017 </pre> The SDK, however, had accumulated components from approximately: <pre> 2017 - 2026 </pre> == Reconstructing a Period-Correct SDK == === Android Studio === <pre> Android Studio 3.0.0 </pre> === Java === <pre> OpenJDK 1.8.0_152 </pre> === SDK Tools === <pre> 26.1.1 </pre> === Platform Tools === <pre> 26.0.0 </pre> Direct download: <pre> https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip </pre> === Build Tools === <pre> 26.0.2 </pre> === Android Platform === <pre> Android 8.0 (API 26) </pre> === Emulator === Recommended: <pre> Android Emulator 27.2.9.0 Build ID 4773671 </pre> === HAXM === <pre> Intel HAXM 7.8.0 </pre> == Verifying SDK Functionality == === List Targets === <syntaxhighlight lang="dos"> avdmanager.bat list target </syntaxhighlight> === List Devices === <syntaxhighlight lang="dos"> avdmanager.bat list device </syntaxhighlight> == Creating a Test Device == <syntaxhighlight lang="dos"> avdmanager create avd ^ -n Test26 ^ -k "system-images;android-26;default;x86" </syntaxhighlight> == Launching the Emulator == <syntaxhighlight lang="dos"> emulator.exe -avd Test26 </syntaxhighlight> == Verifying ADB Connectivity == <syntaxhighlight lang="dos"> adb devices </syntaxhighlight> Expected: <pre> emulator-5554 device </pre> == Restoring AVD Manager == After rebuilding the SDK using period-correct components and configuring Java correctly, Android Studio regained full AVD functionality. == Final Working Configuration == <pre> Android Studio 3.0.0 Java 1.8.0_152 SDK Tools 26.1.1 Platform Tools 26.0.0 Build Tools 26.0.2 Platform Android API 26 System Images Oreo x86 / x86_64 Emulator 27.2.9.0 HAXM 7.8.0 </pre> == Lessons Learned == * Validate components individually. * Avoid mixing SDK generations. * Keep legacy SDKs isolated. * Archive known-good components. == Related Topics == * Android Studio Legacy Environment Preservation * Android SDK Version Compatibility * Intel HAXM Configuration * Android Emulator Troubleshooting * Gradle Dependency Resolution * Software Archaeology and Environment Reconstruction
= Restoring Android Studio 3.0 Android Virtual Device Manager Functionality = '''Summary:''' Android Studio 3.0 was designed around a 2017-era Android SDK. Attempting to use Android Studio 3.0 with modern SDK components can result in missing AVD Manager functionality, Gradle synchronisation failures, emulator incompatibilities, and a generally unstable development environment. This article documents the investigation, diagnosis, reconstruction, and validation of a fully functional Android Studio 3.0 environment capable of running Android 8.0 Oreo (API 26) virtual devices. == Symptoms == The environment initially exhibited the following symptoms: * Android Virtual Device (AVD) Manager missing or unavailable. * Android-specific tooling partially disabled. * Emulator installed but not fully integrated into Android Studio. * Gradle project synchronisation failures. * Dependency resolution failures. * Modern SDK components installed alongside Android Studio 3.0. Example errors included: <syntaxhighlight lang="text"> Could not resolve junit:junit:4.12 Could not resolve javax.inject:javax.inject:1 Could not resolve org.hamcrest:hamcrest-library:1.3 Could not resolve com.squareup:javawriter:2.1.1 </syntaxhighlight> == Environment == === IDE === <pre> Android Studio 3.0.0 Build 171.4408382 </pre> === Operating System === <pre> Windows 10 </pre> === SDK Location === <pre> S:\Android\Sdk </pre> == Initial Observations == Although Android Studio appeared to function, the installed Android SDK contained components from wildly different generations. The SDK contained: <pre> Build Tools 37.0.0 Build Tools 36.x Android Emulator 37.1.11 Android API 36 Command Line Tools (latest) </pre> alongside: <pre> Android Studio 3.0 Android API 26 Build Tools 26.0.2 </pre> This created a compatibility mismatch between the IDE and the SDK. == Investigation Process == === Verify Emulator Installation === The first step was to determine whether the Android Emulator itself was operational. <syntaxhighlight lang="dos"> S:\Android\Sdk\emulator\emulator.exe -version </syntaxhighlight> Output: <pre> Android emulator version 37.1.11.0 </pre> The emulator was present and functioning. The problem therefore was not a missing emulator. === Verify SDK Tools === The next step was to verify installation of the classic Android SDK tooling. <syntaxhighlight lang="dos"> S:\Android\Sdk\tools\bin\avdmanager.bat list target </syntaxhighlight> Initially this failed because Java was not available through the operating system environment. === Verify Java === Android Studio ships with a bundled Java Runtime Environment. <syntaxhighlight lang="dos"> "S:\Program Files\Android\Android Studio\jre\bin\java.exe" -version </syntaxhighlight> Output: <pre> openjdk version "1.8.0_152-release" </pre> Environment variables were then configured: <syntaxhighlight lang="dos"> set JAVA_HOME=S:\Program Files\Android\Android Studio\jre set PATH=%JAVA_HOME%\bin;%PATH% </syntaxhighlight> Once Java was available, SDK tooling began functioning correctly. == Root Cause == The underlying issue was a version mismatch. Android Studio 3.0 expects components contemporary with its release period: <pre> 2017 </pre> The SDK, however, had accumulated components from approximately: <pre> 2017 - 2026 </pre> Android Studio 3.0 can become unstable when paired with modern Android SDK components, particularly: * Modern Emulator releases. * Modern Build Tools. * Modern Platform Tools. * Modern Command Line Tools. == Reconstructing a Period-Correct SDK == === Android Studio === <pre> Android Studio 3.0.0 </pre> === Java === <pre> OpenJDK 1.8.0_152 </pre> === SDK Tools === <pre> 26.1.1 </pre> Validation: <syntaxhighlight lang="dos"> sdkmanager.bat --version </syntaxhighlight> Output: <pre> 26.1.1 </pre> === Platform Tools === <pre> 26.0.0 </pre> Direct download: <pre> https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip </pre> Validation: <syntaxhighlight lang="dos"> adb version </syntaxhighlight> Output: <pre> Android Debug Bridge version 1.0.39 </pre> === Build Tools === <pre> 26.0.2 </pre> Validation: <syntaxhighlight lang="dos"> dir S:\Android\Sdk\build-tools </syntaxhighlight> Output: <pre> 26.0.2 </pre> === Android Platform === <pre> Android 8.0 (API 26) </pre> Validation: <syntaxhighlight lang="dos"> avdmanager.bat list target </syntaxhighlight> Output: <pre> Android API 26 </pre> === Emulator === The originally installed emulator was: <pre> 37.1.11.0 </pre> A period-correct emulator was installed instead. Recommended: <pre> Android Emulator 27.2.9.0 Build ID 4773671 </pre> === HAXM === <pre> Intel HAXM 7.8.0 </pre> Validation: <syntaxhighlight lang="dos"> emulator-check.exe accel </syntaxhighlight> Output: <pre> HAXM version 7.8.0 (4) is installed and usable. </pre> == Verifying SDK Functionality == === List Targets === <syntaxhighlight lang="dos"> avdmanager.bat list target </syntaxhighlight> Expected: <pre> Android API 26 </pre> === List Devices === <syntaxhighlight lang="dos"> avdmanager.bat list device </syntaxhighlight> Expected: <pre> Pixel Pixel XL Nexus 5 Nexus 5X Nexus 6P ... </pre> === Verify Installed System Images === Installed images included: <pre> android-26/default/x86 android-26/default/x86_64 android-26/google_apis_playstore/x86 </pre> == Creating a Test Device == A command-line AVD was created. <syntaxhighlight lang="dos"> avdmanager create avd ^ -n Test26 ^ -k "system-images;android-26;default;x86" </syntaxhighlight> Verification: <syntaxhighlight lang="dos"> avdmanager list avd </syntaxhighlight> Output: <pre> Name: Test26 Target: Android 8.0 Oreo ABI: x86 </pre> == Launching the Emulator == <syntaxhighlight lang="dos"> emulator.exe -avd Test26 </syntaxhighlight> Output: <pre> HAX is working and emulator runs in fast virt mode. </pre> The emulator booted successfully. == Verifying ADB Connectivity == <syntaxhighlight lang="dos"> adb devices </syntaxhighlight> Output: <pre> List of devices attached emulator-5554 device </pre> This confirms: * Emulator operational. * Android boot completed. * ADB communications operational. * Development tooling working correctly. == Restoring AVD Manager == After rebuilding the SDK using period-correct components and configuring Java correctly, Android Studio regained full AVD functionality. The following items became available: * Android Virtual Device Manager. * Pixel device profiles. * Oreo API 26 system images. * AVD creation wizard. * Emulator launch integration. A new Pixel API 26 virtual device was successfully created through the Android Studio graphical interface. == Final Working Configuration == <pre> Android Studio 3.0.0 Java 1.8.0_152 SDK Tools 26.1.1 Platform Tools 26.0.0 Build Tools 26.0.2 Platform Android API 26 System Images Oreo x86 / x86_64 Emulator 27.2.9.0 HAXM 7.8.0 </pre> == Lessons Learned == === Validate Components Individually === A functioning emulator does not prove Android Studio integration is working. Test the following independently: * Java * SDK Tools * Platform Tools * Emulator * HAXM * ADB === Avoid Mixing SDK Generations === The Android SDK evolves rapidly. Combining: <pre> Android Studio 3.0 </pre> with: <pre> Emulator 37.x Build Tools 37.x Platform Tools 37.x </pre> creates compatibility issues. === Keep Legacy SDKs Isolated === Maintain separate SDK trees for: * Legacy Android Studio versions. * Modern Android Studio versions. This prevents accidental upgrades. === Archive Known-Good Components === Google's historical packages can be difficult to locate years later. Maintaining an archive of known-good versions simplifies future environment rebuilds. == Related Topics == * [[Android Studio Legacy Environment Preservation]] * [[Android SDK Version Compatibility]] * [[Intel HAXM Configuration]] * [[Android Emulator Troubleshooting]] * [[Gradle Dependency Resolution]] * [[Software Archaeology]] * [[Development Environment Reconstruction]] == Conclusion == The Android Virtual Device Manager issue was ultimately resolved by reconstructing a period-correct Android Studio 3.0 SDK environment, aligning Java, SDK Tools, Platform Tools, Build Tools, Emulator, and HAXM versions to the same era. Once the toolchain was made historically consistent, Android Studio successfully restored full AVD functionality and was able to create and run a Pixel Oreo (API 26) emulator. The remaining issues, relating to Gradle dependency resolution, became isolated and significantly easier to troubleshoot once the underlying SDK compatibility issues had been eliminated.

Revision as of 09:02, 17 August 2026

= Restoring Android Studio 3.0 Android Virtual Device Manager Functionality = Summary: Android Studio 3.0 was designed around a 2017-era Android SDK. Attempting to use Android Studio 3.0 with modern SDK components can result in missing AVD Manager functionality, Gradle synchronisation failures, emulator incompatibilities, and a generally unstable development environment. This article documents the investigation, diagnosis, reconstruction, and validation of a fully functional Android Studio 3.0 environment capable of running Android 8.0 Oreo (API 26) virtual devices. == Symptoms == The environment initially exhibited the following symptoms: * Android Virtual Device (AVD) Manager missing or unavailable. * Android-specific tooling partially disabled. * Emulator installed but not fully integrated into Android Studio. * Gradle project synchronisation failures. * Dependency resolution failures. * Modern SDK components installed alongside Android Studio 3.0. Example errors included: <syntaxhighlight lang="text"> Could not resolve junit:junit:4.12 Could not resolve javax.inject:javax.inject:1 Could not resolve org.hamcrest:hamcrest-library:1.3 Could not resolve com.squareup:javawriter:2.1.1 </syntaxhighlight> == Environment == === IDE ===

 Android Studio 3.0.0 Build 171.4408382 

=== Operating System ===

 Windows 10 

=== SDK Location ===

 S:\Android\Sdk 

== Initial Observations == Although Android Studio appeared to function, the installed Android SDK contained components from wildly different generations. The SDK contained:

 Build Tools 37.0.0 Build Tools 36.x Android Emulator 37.1.11 Android API 36 Command Line Tools (latest) 

alongside:

 Android Studio 3.0 Android API 26 Build Tools 26.0.2 

This created a compatibility mismatch between the IDE and the SDK. == Investigation Process == === Verify Emulator Installation === The first step was to determine whether the Android Emulator itself was operational. <syntaxhighlight lang="dos"> S:\Android\Sdk\emulator\emulator.exe -version </syntaxhighlight> Output:

 Android emulator version 37.1.11.0 

The emulator was present and functioning. The problem therefore was not a missing emulator. === Verify SDK Tools === The next step was to verify installation of the classic Android SDK tooling. <syntaxhighlight lang="dos"> S:\Android\Sdk\tools\bin\avdmanager.bat list target </syntaxhighlight> Initially this failed because Java was not available through the operating system environment. === Verify Java === Android Studio ships with a bundled Java Runtime Environment. <syntaxhighlight lang="dos"> "S:\Program Files\Android\Android Studio\jre\bin\java.exe" -version </syntaxhighlight> Output:

 openjdk version "1.8.0_152-release" 

Environment variables were then configured: <syntaxhighlight lang="dos"> set JAVA_HOME=S:\Program Files\Android\Android Studio\jre set PATH=%JAVA_HOME%\bin;%PATH% </syntaxhighlight> Once Java was available, SDK tooling began functioning correctly. == Root Cause == The underlying issue was a version mismatch. Android Studio 3.0 expects components contemporary with its release period:

 2017 

The SDK, however, had accumulated components from approximately:

 2017 - 2026 

Android Studio 3.0 can become unstable when paired with modern Android SDK components, particularly: * Modern Emulator releases. * Modern Build Tools. * Modern Platform Tools. * Modern Command Line Tools. == Reconstructing a Period-Correct SDK == === Android Studio ===

 Android Studio 3.0.0 

=== Java ===

 OpenJDK 1.8.0_152 

=== SDK Tools ===

 26.1.1 

Validation: <syntaxhighlight lang="dos"> sdkmanager.bat --version </syntaxhighlight> Output:

 26.1.1 

=== Platform Tools ===

 26.0.0 

Direct download:

 https://dl.google.com/android/repository/platform-tools_r26.0.0-windows.zip 

Validation: <syntaxhighlight lang="dos"> adb version </syntaxhighlight> Output:

 Android Debug Bridge version 1.0.39 

=== Build Tools ===

 26.0.2 

Validation: <syntaxhighlight lang="dos"> dir S:\Android\Sdk\build-tools </syntaxhighlight> Output:

 26.0.2 

=== Android Platform ===

 Android 8.0 (API 26) 

Validation: <syntaxhighlight lang="dos"> avdmanager.bat list target </syntaxhighlight> Output:

 Android API 26 

=== Emulator === The originally installed emulator was:

 37.1.11.0 

A period-correct emulator was installed instead. Recommended:

 Android Emulator 27.2.9.0 Build ID 4773671 

=== HAXM ===

 Intel HAXM 7.8.0 

Validation: <syntaxhighlight lang="dos"> emulator-check.exe accel </syntaxhighlight> Output:

 HAXM version 7.8.0 (4) is installed and usable. 

== Verifying SDK Functionality == === List Targets === <syntaxhighlight lang="dos"> avdmanager.bat list target </syntaxhighlight> Expected:

 Android API 26 

=== List Devices === <syntaxhighlight lang="dos"> avdmanager.bat list device </syntaxhighlight> Expected:

 Pixel Pixel XL Nexus 5 Nexus 5X Nexus 6P ... 

=== Verify Installed System Images === Installed images included:

 android-26/default/x86 android-26/default/x86_64 android-26/google_apis_playstore/x86 

== Creating a Test Device == A command-line AVD was created. <syntaxhighlight lang="dos"> avdmanager create avd ^ -n Test26 ^ -k "system-images;android-26;default;x86" </syntaxhighlight> Verification: <syntaxhighlight lang="dos"> avdmanager list avd </syntaxhighlight> Output:

 Name: Test26 Target: Android 8.0 Oreo ABI: x86 

== Launching the Emulator == <syntaxhighlight lang="dos"> emulator.exe -avd Test26 </syntaxhighlight> Output:

 HAX is working and emulator runs in fast virt mode. 

The emulator booted successfully. == Verifying ADB Connectivity == <syntaxhighlight lang="dos"> adb devices </syntaxhighlight> Output:

 List of devices attached emulator-5554 device 

This confirms: * Emulator operational. * Android boot completed. * ADB communications operational. * Development tooling working correctly. == Restoring AVD Manager == After rebuilding the SDK using period-correct components and configuring Java correctly, Android Studio regained full AVD functionality. The following items became available: * Android Virtual Device Manager. * Pixel device profiles. * Oreo API 26 system images. * AVD creation wizard. * Emulator launch integration. A new Pixel API 26 virtual device was successfully created through the Android Studio graphical interface. == Final Working Configuration ==

 Android Studio 3.0.0 Java 1.8.0_152 SDK Tools 26.1.1 Platform Tools 26.0.0 Build Tools 26.0.2 Platform Android API 26 System Images Oreo x86 / x86_64 Emulator 27.2.9.0 HAXM 7.8.0 

== Lessons Learned == === Validate Components Individually === A functioning emulator does not prove Android Studio integration is working. Test the following independently: * Java * SDK Tools * Platform Tools * Emulator * HAXM * ADB === Avoid Mixing SDK Generations === The Android SDK evolves rapidly. Combining:

 Android Studio 3.0 

with:

 Emulator 37.x Build Tools 37.x Platform Tools 37.x 

creates compatibility issues. === Keep Legacy SDKs Isolated === Maintain separate SDK trees for: * Legacy Android Studio versions. * Modern Android Studio versions. This prevents accidental upgrades. === Archive Known-Good Components === Google's historical packages can be difficult to locate years later. Maintaining an archive of known-good versions simplifies future environment rebuilds. == Related Topics == * Android Studio Legacy Environment Preservation * Android SDK Version Compatibility * Intel HAXM Configuration * Android Emulator Troubleshooting * Gradle Dependency Resolution * Software Archaeology * Development Environment Reconstruction == Conclusion == The Android Virtual Device Manager issue was ultimately resolved by reconstructing a period-correct Android Studio 3.0 SDK environment, aligning Java, SDK Tools, Platform Tools, Build Tools, Emulator, and HAXM versions to the same era. Once the toolchain was made historically consistent, Android Studio successfully restored full AVD functionality and was able to create and run a Pixel Oreo (API 26) emulator. The remaining issues, relating to Gradle dependency resolution, became isolated and significantly easier to troubleshoot once the underlying SDK compatibility issues had been eliminated.