Android:将x86_64软件包部署到x64设备会生成不兼容的ABI错误

时间:2016-08-18 11:56:03

标签: android c++ visual-studio-2015 abi

我使用Visual Studio 2015(Windows 10 64位)创建了一个全新的NativeActivity应用程序。本机活动包含一些示例代码,它们简单地在黑色/绿色之间淡化屏幕。 我可以使用x86配置将其成功部署到我的测试设备。 当我尝试使用x64配置进行部署时,出现“不兼容的ABI”错误。 具体来说:

  

包ABI'x86_64'与设备的ABI'x64'不兼容   'Acer GT-810(x64 - 549000410412)'

错误似乎很奇怪,因为x86_64肯定是x64?!

该设备肯定是64位。 是因为这个设备实际上没有x64的ABI吗? 我错过了编译器设置吗?

我在下面列出了完整的构建输出:

1>------ Build started: Project: Android1.NativeActivity, Configuration: Debug x64 ------
1>  ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
1>  ANT_HOME=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\
1>  JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
1>  NDK_ROOT=C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r11c\
1>  Android1.NativeActivity.vcxproj -> C:\Dev\Android1\x64\Debug\libAndroid1.so
2>------ Build started: Project: Android1.Packaging, Configuration: Debug x64 ------
2>  ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
2>  ANT_HOME=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Apps\apache-ant-1.9.3\
2>  JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_55
2>  java.home=
2>  NDK_ROOT=C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r11c\
2>  ANDROID_NDK_HOME=C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r11c\
2>  Buildfile: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Package\build.xml
2>
2>  -set-mode-check:
2>
2>  -set-debug-files:
2>
2>  -check-env:
2>   [checkenv] Android SDK Tools Revision 25.1.7
2>   [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk
2>
2>  -setup:
2>       [echo] Project Name: Android1.Packaging
2>    [gettype] Project Type: Application
2>
2>  -set-debug-mode:
2>
2>  -debug-obfuscation-check:
2>
2>  -pre-build:
2>
2>  -build-setup:
2>  [getbuildtools] Using latest Build Tools: 24.0.1
2>       [echo] Resolving Build Target for Android1.Packaging...
2>  [gettarget] Project Target:   Android 5.1.1
2>  [gettarget] API level:        22
2>       [echo] ----------
2>       [echo] Creating output directories if needed...
2>       [echo] ----------
2>       [echo] Resolving Dependencies for Android1.Packaging...
2>  [dependency] Library dependencies:
2>  [dependency] No Libraries
2>  [dependency]
2>  [dependency] ------------------
2>       [echo] ----------
2>       [echo] Building Libraries with 'debug'...
2>     [subant] No sub-builds to iterate on
2>
2>  -code-gen:
2>  [mergemanifest] Found Deleted Target File
2>  [mergemanifest] Merging AndroidManifest files into one.
2>  [mergemanifest] Manifest merger disabled. Using project manifest only.
2>       [echo] hasCode = false. Skipping aidl/renderscript/R.java
2>
2>  -pre-compile:
2>
2>  -compile:
2>       [echo] hasCode = false. Skipping...
2>
2>  -post-compile:
2>
2>  -obfuscate:
2>
2>  -dex:
2>       [echo] hasCode = false. Skipping...
2>
2>  -crunch:
2>     [crunch] Crunching PNG Files in source dir: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Package\res
2>     [crunch] To destination dir: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Package\bin\res
2>     [crunch] Crunched 0 PNG files to update cache
2>
2>  -package-resources:
2>       [aapt] Found Deleted Target File
2>       [aapt] Creating full resource package...
2>
2>  -package:
2>  [apkbuilder] Found Deleted Target File
2>  [apkbuilder] Creating Android1.Packaging-debug-unaligned.apk and signing it with a debug key...
2>
2>  -post-package:
2>
2>  -do-debug:
2>   [zipalign] Running zip align on final apk...
2>       [echo] Debug Package: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Android1.apk
2>  [propertyfile] Updating property file: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Package\bin\build.prop
2>  [propertyfile] Updating property file: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Package\bin\build.prop
2>  [propertyfile] Updating property file: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Package\bin\build.prop
2>  [propertyfile] Updating property file: C:\Dev\Android1\Android1\Android1.Packaging\x64\Debug\Package\bin\build.prop
2>
2>  -post-build:
2>
2>  debug:
2>
2>  BUILD SUCCESSFUL
2>  Total time: 1 second
3>------ Deploy started: Project: Android1.Packaging, Configuration: Debug x64 ------
3>Error installing the package. The package ABI 'x86_64' is incompatible with the ABI 'x64' of device 'Acer GT-810 (x64 - 549000410412)'.
3>Incompatible ABIs.
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

0 个答案:

没有答案