Missing architectures in apklib with native code apklib dependency (android-maven-plugin)

StackOverflow https://stackoverflow.com/questions/21333524

  •  02-10-2022
  •  | 
  •  

سؤال

I have an apklib which includes 3 architecture lib: armeabi/lib.so armeabi-v7a/lib.so x86/lib.so

I m using this apklib as a dependency for other apk and/or apklib projects, but when building with maven-android-plugin my project just contain one architecture lib.

This has been reported on: maven-android-plugin

I m trying to find out a work around for having all architecture libs provided by my apklib dependency added to my apk final project.

هل كانت مفيدة؟

المحلول

To get all architectures just add ndkArchitecture configuration onto your pom.xml:

<plugin>
  <groupId>com.jayway.maven.plugins.android.generation2</groupId>
  <artifactId>android-maven-plugin</artifactId>
  <version>3.8.2</version>
  <configuration>
    <sdk>
      <platform>${sdk.platform}</platform>
    </sdk>
    <ndkArchitecture>armeabi armeabi-v7a x86</ndkArchitecture>
  </configuration>
</plugin>

But in order to work maven android plugin version must be: 3.8.2 (with maven 3.1.1)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top