Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[error] native-run failed with error #312

Open
mdsarowar opened this issue May 20, 2023 · 4 comments
Open

[error] native-run failed with error #312

mdsarowar opened this issue May 20, 2023 · 4 comments
Labels

Comments

@mdsarowar
Copy link

Version: 7

npx cap run android

Description:
[error] native-run failed with error

    ERR_UNSUITABLE_API_INSTALLATION: No suitable API installation found. Use --sdk-info to      
    reveal missing packages and other issues.

Command Output:

SDK Info:

4 issues were found when checking AAR metadata:

  1. Dependency 'androidx.room:room-runtime:2.5.0' requires libraries and applications that
    depend on it to compile against version 33 or later of the
    Android APIs.

    :app is currently compiled against android-32.

    Recommended action: Update this project to use a newer compileSdkVersion
    of at least 33, for example 33.

    Note that updating a library or application's compileSdkVersion (which
    allows newer APIs to be used) can be done separately from updating
    targetSdkVersion (which opts the app in to new runtime behavior) and
    minSdkVersion (which determines which devices the app can be installed
    on).

  2. Dependency 'androidx.sqlite:sqlite-framework:2.3.0' requires libraries and applications that
    depend on it to compile against version 33 or later of the
    Android APIs.

    :app is currently compiled against android-32.

    Recommended action: Update this project to use a newer compileSdkVersion
    of at least 33, for example 33.

    Note that updating a library or application's compileSdkVersion (which
    allows newer APIs to be used) can be done separately from updating
    targetSdkVersion (which opts the app in to new runtime behavior) and
    minSdkVersion (which determines which devices the app can be installed
    on).

  3. Dependency 'androidx.sqlite:sqlite:2.3.0' requires libraries and applications that
    depend on it to compile against version 33 or later of the
    Android APIs.

    :app is currently compiled against android-32.

    Recommended action: Update this project to use a newer compileSdkVersion
    of at least 33, for example 33.

    Note that updating a library or application's compileSdkVersion (which
    allows newer APIs to be used) can be done separately from updating
    targetSdkVersion (which opts the app in to new runtime behavior) and
    minSdkVersion (which determines which devices the app can be installed
    on).

  4. Dependency 'androidx.security:security-crypto:1.1.0-alpha05' requires libraries and applications that
    depend on it to compile against version 33 or later of the
    Android APIs.

    :app is currently compiled against android-32.

    Recommended action: Update this project to use a newer compileSdkVersion
    of at least 33, for example 33.

    Note that updating a library or application's compileSdkVersion (which
    allows newer APIs to be used) can be done separately from updating
    targetSdkVersion (which opts the app in to new runtime behavior) and
    minSdkVersion (which determines which devices the app can be installed
    on).

@regetskcob
Copy link

Hi, I'm currently encounterin the same problem. Created a blank app, tried to run it and got this error. Which command did you run manually in terminal to add the --sdk-info param? Then I'd compare my information with yours.

@xlinxie
Copy link

xlinxie commented Jun 18, 2023

try run npx native-run android --sdk-info --verbose to show more helpful info

@directormac
Copy link

try run npx native-run android --sdk-info --verbose to show more helpful info

this just throws

npm ERR! Cannot read properties of null (reading 'package')

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-07-08T09_30_17_639Z-debug-0.log

@xlinxie
Copy link

xlinxie commented Jul 8, 2023

try run npx native-run android --sdk-info --verbose to show more helpful info

this just throws

npm ERR! Cannot read properties of null (reading 'package')

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Local\npm-cache\_logs\2023-07-08T09_30_17_639Z-debug-0.log

it seems like your native-run package is not correctly installed

please refer npm/cli#4787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants