code

'기기는 x86을 지원하지만 APK는 armeabi-v7a 만 지원'오류의 이유는 무엇입니까?

codestyles 2020. 10. 13. 07:51
반응형

'기기는 x86을 지원하지만 APK는 armeabi-v7a 만 지원'오류의 이유는 무엇입니까?


GitHub에서 일부 프로젝트를 테스트하여 Android Studio를 사용하고 있으며 apk를 에뮬레이션하려고 할 때 에뮬레이터를 선택할 수 없습니다.

그것은 나에게 말한다 :

기기는 x86을 지원하지만 APK는 armeabi-v7a 만 지원합니다.

왜 이렇게합니까?


같은 문제가 있었는데 module : app 에서 build.gradle확인했습니다 . 다음과 같은 구성이 있음이 밝혀졌습니다.

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

내가 모든 것을 언급했을 때 모든 것이 잘 작동했습니다.

React Native Android 프로젝트를 다루려고했습니다 .


USB 디버깅을 끄고 하드웨어 장치에서 다시 켭니다.


Android Studio에서 Build 메뉴를 선택하고

여기에 이미지 설명 입력

그런 다음 Select Build Variant ... 를 클릭 하고 'Build Variants'창에서 x86Debug (또는 릴리스)를 선택하십시오.

여기에 이미지 설명 입력

추신 : Mac에서 Android Studio 2.3을 사용하고 있습니다.


Linux : 파일> 캐시 무효화 / 다시 시작 전화 : 대신이 장치 충전을 사진 전송 (PTP)으로 변경합니다.


내 경우에는 Linux 시스템 adb devices

List of devices attached 
44b194f5    no permissions

그런 다음 adb 서버를 다시 시작했습니다.

sudo adb kill-server

그리고

sudo adb start-server

그런 다음 장치를 연결하고 디버깅을 켜고

adb devices
List of devices attached 
44b194f5    device

마침내 장치에서 실행할 수있었습니다


비슷한 문제가 있었는데 아래와 같이 "abiFilters"목록에 "x86"값을 추가하여 해결했습니다.

[build.gradle (Module : app) 파일 열기] deafultSection 에서 " ndk "를 검색 하고 "x86"을 추가하세요!

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

도움이 되었기를 바랍니다 !!!


Device supports x86, but APK only supports armeabi-v7a)

Sounds like you used an x86 image in the emulator.

Create a separate one. Choose "other images" tab to find arm devices, if you have to.

Or, run on an actual device. The repo you listed is meant to run on a Raspberry Pi 3 / ODroid, I think.


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.


You need to reconnect your device and try to turn off/on the developer options.

See Enable developer options and debugging


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"
    

Just go to device Settings >> Developer Options >> Restore Default Settings then enable USB debugging


For me it worked my changing the cable option from

-> Charge Only. 

To

-> Transfer file.

On my physical device, I started getting this. The fix was to go into Developer Settings and turn off and on USB debugging.


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

adb kill-server

adb start-server

Its working for me on windows OS.


Test your code on real phone. If you have still same issue,then import your code again and before this you should update your SDK and create a new emulator with ARM system image.


Many times this means that you have not granted your laptop/computer access to your device. Take a look at your device and click the "Allow Access" button as well as the debugging permissions.


Running an AVD using the x86 processor is 10x faster than using the ARM emulator, but most of the time you are only compiling your APK for ARM. To have faster emulation runs using an x86 AVD I had to do the following (for a Cocos2d-x project):

  • app/jni/Android.mk

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

    PROP_APP_ABI=armeabi-v7a:x86
    
  • app/build.gradle

    android {
        ...
        defaultConfig {
            ...
            ndk {
                abiFilters = []
                abiFilters.addAll(PROP_APP_ABI.split(':').collect{it as String})
            }
        }
    }
    

Restarting device solved problem for me (React-native)


Android Studio를 업데이트 한 후 나에게 일어났습니다. 제 경우에는 빌드 설정이 x86Debug-x86에 자동으로 구성되지 않았기 때문에 발생했습니다. Build >> Select Build Variant >>를 열어서 변경하십시오. 빌드 변형 옵션을 armeabi-v7a에서 x86Debug-x86 또는 에뮬레이터에서 필요한 것으로 변경하십시오.

참고 URL : https://stackoverflow.com/questions/41775988/what-is-the-reason-for-the-error-device-supports-x86-but-apk-only-supports-arm

반응형