-1
\$\begingroup\$

I am trying to upload my game (finally) to the google play store but I am faced with one final problem that I have attempted to fix but have of course failed! The error message that pops up is as follows:

  • The following APKs or App Bundles are available to 64-bit devices, but they only have 32-bit native code: 1.

With this I assume I need to convert my unity game from 32-bit to 64-bit, but how?

This is the error that pops up in the console:

Failed running /Applications/Unity/Hub/Editor/2018.4.20f1/Unity.app/Contents/il2cpp/build/il2cppcore/il2cppcore.dll --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="/Users/myname/game/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a/libil2cpp.so" --cachedirectory="/Users/myname/game/Assets/../Library/il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" --additional-include-directories="/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" --tool-chain-path="/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b" --map-file-parser="/Applications/Unity/Hub/Editor/2018.4.20f1/Unity.app/Contents/Tools/MapFileParser/MapFileParser" --directory="/Users/myname/game/Temp/StagingArea/assets/bin/Data/Managed" --generatedcppdir="/Users/myname/game/Temp/StagingArea/Il2Cpp/il2cppOutput"

stdout: Building libil2cpp.so with AndroidToolChain Output directory: /Users/myname/game/Temp/StagingArea/assets/bin/Data/Native/armeabi-v7a Cache directory: /Users/myname/game/Library/il2cpp_android_armeabi-v7a/il2cpp_cache il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException:

Invocation was: Executable: /Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/Unity.app/Contents/il2cpp/external/boehmgc/include" -I"/Users/myname/game/Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sysroot" -gcc-toolchain "/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value "/Users/myname/game/Temp/StagingArea/Il2Cpp/il2cppOutput/Il2CppTypeDefinitions.cpp" -o "/Users/myname/game/Library/il2cpp_android_armeabi-v7a/il2cpp_cache/2106D4301BA2814B400A09E4DE4FEE7C.o"

at Unity.IL2CPP.Building.CppProgramBuilder.BuildAllCppFiles(IEnumerable`1 sourceFilesToCompile, IBuildStatisticsCollector statisticsCollector) at Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics) at il2cpp.Program.DoRun(String[] args) at il2cpp.Program.Run(String[] args) at il2cpp.Program.Main(String[] args) stderr:

Unhandled Exception: Unity.IL2CPP.Building.BuilderFailedException:

Invocation was: Executable: /Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ Arguments: -DNET_4_0 -DUNITY_AOT -DGC_NOT_DLL -DRUNTIME_IL2CPP -DLINUX -DANDROID -DPLATFORM_ANDROID -D__linux__ -D__STDC_FORMAT_MACROS -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/Tools/bdwgc/include" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/Tools/libil2cpp/include" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/Unity.app/Contents/il2cpp/libil2cpp" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/Unity.app/Contents/il2cpp/external/boehmgc/include" -I"/Users/myname/game/Temp/StagingArea/Il2Cpp/il2cppOutput" -I"." -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/include/backward" -I"/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include" -c -g -DNDEBUG -funwind-tables -fno-limit-debug-info -fdata-sections -ffunction-sections -Wa,--noexecstack -fno-rtti -std=c++98 -fno-strict-aliasing -fvisibility=hidden -fvisibility-inlines-hidden -fno-strict-overflow -fPIC -Os --sysroot "/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sysroot" -gcc-toolchain "/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64" -target armv7-none-linux-androideabi -isystem "/Applications/Unity/Hub/Editor/2018.4.20f1/PlaybackEngines/AndroidPlayer/android-ndk-r16b/sysroot/usr/include/arm-linux-androideabi" -D__ANDROID_API__=16 -march=armv7-a -mfloat-abi=softfp -mfpu=neon-fp16 -Wno-unused-value

Other Settings Publishing Settings Build Settings

\$\endgroup\$
1
\$\begingroup\$

Searching for this error message reveals this thread as the very first search hit, where we find this reply from a Unity rep:

Like mentioned in other threads, deselect x86 architecture in Player Settings

The second result reminds you to select IL2CPP as your Scripting Backend and make sure you've ticked the ARM64 box which is currently disabled in your screenshot because you're using Mono.

Based on the replies, you may also need to clear out your library and package folders after changing this setting and re-build, to clear out any remaining 32-bit content that was cached.

Please remember to do a basic search like this when you run into trouble, especially for standard error messages. More often than not, you'll find someone has already shared an answer to your problem.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

This video solution has definitely helped ----> https://www.youtube.com/watch?v=LuBoM1Y8mp0

| improve this answer | |
\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.