Skip to content

Android: ERR_SDK_PACKAGE_NOT_FOUND - but the Android SDK is installed properly #387

@davepruitt

Description

@davepruitt

Version:

2.0.1

Description:

I created a brand new Ionic project and went through the typical process of adding Android to the project. I already have the Android SDK installed at the following path: C:\Program Files (x86)\Android\android-sdk

The ANDROID_SDK_HOME environment variable has been set to the above-mentioned path.

Screenshots from the Android SDK manager showing things are installed:

android_sdk_screenshot_01 android_sdk_screenshot_02

Command Output:

> npx cap run android -- --verbose --sdk-info

√ Copying web assets from dist to android\app\src\main\assets\public in 25.69ms
√ Creating capacitor.config.json in android\app\src\main\assets in 1.38ms
\ copy android [info] Inlining sourcemaps
√ copy android in 59.52ms
√ Updating Android plugins in 3.75ms
[info] Found 4 Capacitor plugins for android:
       @capacitor/app@6.0.0
       @capacitor/haptics@6.0.0
       @capacitor/keyboard@6.0.0
       @capacitor/status-bar@6.0.0
√ update android in 43.58ms
[error] native-run failed with error

        ERR_SDK_PACKAGE_NOT_FOUND: SDK package not found by location: C:\Program Files
        (x86)\Android\android-sdk\platform-tools.

        More details for this error may be available online:
        https://github.com/ionic-team/native-run/wiki/Android-Errors

SDK Info:

> native-run android --sdk-info

SDK Location:         C:\Program Files (x86)\Android\android-sdk
AVD Home:             C:\Users\david\.android\avd

API Level:            29
Packages:             Android SDK Platform 29  platforms;android-29  5


API Level:            27
Packages:             Android SDK Platform 27  platforms;android-27  3


Tools:

Android Emulator  emulator  32.1.14
SDK Patch Applier v4  patcher;v4  1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions