- Home /
Exception: Unkown CPU architecture for Android static library as Plugin
I sucessfully build an Android static library (.a) file, however if i place it into the Assets/Plugins/Android folder, building the Unity project fails with: Exception: Unknown CPU architecture for library, even if i don't actually call the plugin from scripts. Include Platform (Android) and CPU architecture (ARMv7) are set correctly in the Plugin Inspector. Unity version is 2019.3.0a3.
What might be a cause for this? According to the documentation, Android static libraries are supported as Plugins.
Answer by Dr-Nick · May 09, 2020 at 06:15 AM
Not sure if this relates to your issue but I think a libraries are for iOS. I found that a plugin which had libraries for both Android and iOS was including the iOS libraries which was causing the build to fail. You need to make sure iOS libraries are not being packaged when you go to build. Hope that helps someone.
Answer by kurroarashi · Mar 14, 2021 at 10:44 AM
Having the same problem in 2020.3. Plus, if I use a *.so file instead, it's just not gonna throw a managed DllNotFoundException at runtime.
Your answer
Follow this Question
Related Questions
EntryPointNotFound exception when integrating Picovoice Porcupine 0 Answers
Reading Native Surface Texture into Streaming Unity Texture [Android]? 3 Answers
Rendering Android native view with OpenGL 0 Answers
Unity Android Native Library Entry Point Not Found but ONLY on recently added functions 0 Answers
How to create android notification to keep foreground service alive? 2 Answers