What is the reason for the error “Device supports x86, but APK only supports armeabi-v7a”

前端 未结 23 2197
悲哀的现实
悲哀的现实 2020-12-13 01:36

I am playing around with Android Studio by testing some projects out from GitHub and when I try to emulate the apk, it does not let me choose an emulator.

It tells m

相关标签:
23条回答
  • 2020-12-13 02:00

    On Linux: File > Invalidate Cache / Restart On phone: Instead Charge this device change to Transfer photos (PTP)

    0 讨论(0)
  • 2020-12-13 02:01

    Can confirm, toggling USB debugging off/on in Developer Options resolved the issue. Maybe even cancel the "Select Deployment Target" window in Android Studio and try to run the app again after toggling USB debugging.

    0 讨论(0)
  • 2020-12-13 02:01

    If you use Ubuntu:

    1. make sure that usb debugging is ON
    2. check your cable connection
    3. on notification bar check android system notification and touch it for change charging state to file transfer
    4. now go terminal and type: adb devices after run this command adb restart and your device show in list
    0 讨论(0)
  • 2020-12-13 02:02

    I had the same problem, I checkout the build.gradle from module:app. It turns out that there's a such config:

        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    

    when I commented all out, everything worked fine.

    I was trying to deal with the React Native Android project.

    0 讨论(0)
  • 2020-12-13 02:02

    In my case my app use some native libraries. Each platform requires the corresponding libs to be built.

    So the native lib of x86(or any other) platform is not generated.You must have add an abifilter somewhere:

    There are several places where abi filters can be specified:

    • Application.mk add the platform you need like this:

      APP_ABI := armeabi armeabi-v7a x86
      
    • build.gradle

      find abiFilters, and add platform you need like this:

      abiFilters   "armeabi","armeabi-v7a","x86"
      
    0 讨论(0)
  • 2020-12-13 02:04

    For me it worked my changing the cable option from

    -> Charge Only. 
    

    To

    -> Transfer file.
    
    0 讨论(0)
提交回复
热议问题