1

My project require native library and I have generated .so files for 'x86', 'x86_64', 'armeabi-v7a', 'arm64_v8a' architectures.

In app gradle also I have defined ndk support for following ndk.abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64_v8a'

But when I generate an apk using android studio and analyze it using "Analyze apk" tool, it only shows 3 folders in lib directory x86, x86_64, and armeabi-v7a

It does not create "arm64_v8a" folder to fully support 64-bit devices.

Pirate
  • 545
  • 1
  • 6
  • 15

1 Answers1

1

Reading carefully what you wrote I suspect the root of the problem might be found in the app level build.gradle file of your project:

  • I presume your build.gradle file contains an abi filter tag, containing the required achitecture names, 'arm64_v8a' among them.

  • but the correct, official name of this architecture is 'arm64-v8a'

  • if I am right, you should just correct the architecture name from 'arm64_v8a' to 'arm64-v8a', and problem solved (I have had the same error recently, and after I corrected the abi filter with the official name, the error message has gone :)

BigMick
  • 56
  • 7
  • I am reasonable sure that this is an answer. But the way it is phrased it risks being mistaken for a clarification question. That should be done by using a comment, which of course you do not yet have enough reputation for (https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). If you did mena this to be a question, I recommend to rephrase without the rhetoric question. Please [edit] to do so. If you really want an answer to the question in order to then answer completly I am sorry to say that this is not how Stackoverflow is meant. – Yunnosch May 13 '20 at 20:18
  • @Yunnosch: thanks for your remark, you were right. I edited my answer, and I hope it became acceptable – BigMick May 13 '20 at 20:43
  • Much better now, not looking like a question anymore. However (sorry), "I have had the same problem." is also dangerous, risking being mistaken for a not appreciated "Me too." answer. There are some lazy but trigger-happy readers here.... (I, especially tired, am sometimes among them.) Please take this as the constructive help I mean it to be. By the way, welcome to StackOverflow. And sorry, I cannot upvote, because the technical topic is beyond me. Good luck. – Yunnosch May 13 '20 at 20:47
  • @BigMick: You are right but I solved it in a different way. I added an Application.mk file in my native project and generated .so files for all architectures by adding "APP_ABI := all" in it. And also removed abiFilters from build.gradle. And it worked. But I solved it much earlier than you answered it. – Pirate Nov 09 '21 at 07:18