Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm64-v8a native lib missing from final apk #682

Closed
Miksu82 opened this issue Sep 30, 2015 · 19 comments
Closed

arm64-v8a native lib missing from final apk #682

Miksu82 opened this issue Sep 30, 2015 · 19 comments

Comments

@Miksu82
Copy link

Miksu82 commented Sep 30, 2015

So in my pom I have

    <dependency>
      <groupId>my.groupid</groupId>
      <artifactId>myartifact</artifactId>
      <version>1.0.0</version>
      <classifier>armeabi</classifier>
      <type>so</type>
    </dependency>

    <dependency>
      <groupId>my.groupid</groupId>
      <artifactId>myartifact</artifactId>
      <version>1.0.0</version>
      <classifier>armeabi-v7a</classifier>
      <type>so</type>
    </dependency>

    <dependency>
      <groupId>my.groupid</groupId>
      <artifactId>myartifact</artifactId>
      <version>1.0.0</version>
      <classifier>arm64-v8a</classifier>
      <type>so</type>
    </dependency>

    <dependency>
      <groupId>my.groupid</groupId>
      <artifactId>myartifact</artifactId>
      <version>1.0.0</version>
      <classifier>x86</classifier>
      <type>so</type>
    </dependency>

    <dependency>
      <groupId>my.groupid</groupId>
      <artifactId>myartifact</artifactId>
      <version>1.0.0</version>
      <classifier>x86_64</classifier>
      <type>so</type>
    </dependency>

But in the final apk there is no library for arm64-v8a.

I only see

   192240  09-30-15 15:18   lib/armeabi/libmyartifact.so
   117212  09-30-15 15:18   lib/armeabi-v7a/libmyartifact.so
   203164  09-30-15 15:18   lib/x86/libmyartifact.so
   196656  09-30-15 15:19   lib/x86_64/libmyartifact.so

If I do

    <dependency>
      <groupId>my.groupid</groupId>
      <artifactId>myartifact</artifactId>
      <version>1.0.0</version>
      <classifier>arm64-v8a</classifier>
      <type>so</type>
    </dependency>

The result is

   192240  09-30-15 15:18   lib/armeabi/libmyartifact.so
@slavasav
Copy link

Bump, same issue here. Any plans on fixing this? Is there a workaround?

@Miksu82
Copy link
Author

Miksu82 commented Jan 25, 2016

The workaround I ended up using was something like this

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-dependency-plugin</artifactId>
  <executions>
    <execution>
      <id>copy-native-libs</id>
      <phase>prepare-package</phase>
      <goals>
        <goal>copy</goal>
      </goals>
      <configuration>
        <artifactItems>
          <artifactItem>
            <groupId>my.groupid</groupId>
            <artifactId>myartifact</artifactId>
            <version>1.0.0</version>
            <classifier>armeabi</classifier>
            <type>so</type>
            <outputDirectory>lib/armeabi</outputDirectory>
            <destFileName>libmyartifact.so</destFileName>
          </artifactItem>
          <artifactItem>
            <groupId>my.groupid</groupId>
            <artifactId>myartifact</artifactId>
            <version>1.0.0</version>
            <classifier>armeabi-v7a</classifier>
            <type>so</type>
            <outputDirectory>lib/armeabi-v7a</outputDirectory>
            <destFileName>libmyartifact.so</destFileName>
          </artifactItem>
          <artifactItem>
            <groupId>my.groupid</groupId>
            <artifactId>myartifact</artifactId>
            <version>1.0.0</version>
            <classifier>arm64-v8a</classifier>
            <type>so</type>
            <outputDirectory>lib/arm64-v8a</outputDirectory>
            <destFileName>libmyartifact.so</destFileName>
          </artifactItem>
        </artifactItems>
      </configuration>
    </execution>
  </executions>
</plugin>

@nahojkap
Copy link
Member

Seems the 'arm64-v8a' ABI was missing from the list of supported ones in the current master. Will add this to the list. Would you be able to test this with a snapshot build?

nahojkap added a commit that referenced this issue Jan 25, 2016
@mosabua
Copy link
Member

mosabua commented Jan 25, 2016

I would rather have this added and fixed in the android-ndk-maven-plugin. I am hoping to remove NDK support after the upcoming release in this plugin.

@nahojkap
Copy link
Member

Hi @mosabua - unfortunately there is still a need for this (and yes, it is duplicated in the two projects) - the NDK plugin uses it for compiles, but the APK plugin will use it for placing the compiled native library in the correct location inside the APK.

@mosabua
Copy link
Member

mosabua commented Jan 25, 2016

Fair enough.

@mosabua
Copy link
Member

mosabua commented Jan 25, 2016

Could you add this fix to the changelog please...

@nahojkap
Copy link
Member

Will do

On Mon, Jan 25, 2016, 18:17 Manfred Moser [email protected] wrote:

Could you add this fix to the changelog please...


Reply to this email directly or view it on GitHub
#682 (comment)
.

@nahojkap
Copy link
Member

Done

@slavasav
Copy link

It depends on commons-io:commons-io:jar:2.5 now which is not in maven central yet. Can you advise where you pull this dependency from?

@nahojkap
Copy link
Member

Indeed is the case - it builds OK with 2.4 of commons-io but have not had a chance to give it a spin - could you try with 2.4?

@mosabua
Copy link
Member

mosabua commented Jan 28, 2016

Dang... not sure how that happened. I will cut another release 4.4.1 to fix that and announce after..

@mosabua
Copy link
Member

mosabua commented Jan 29, 2016

4.4.1 is now out and it uses 2.4 so you should be good. I will do release announcement tomorrow.

@slavasav
Copy link

I can confirm the 4.4.1 version works as expected, thanks.

@nahojkap
Copy link
Member

Thanks @slavasav - assume safe to close then? :)

@slavasav
Copy link

Yes if you ask me :)

Sent from SlavaPhone

On 29 Jan 2016, at 19:06, Johan Lindquist [email protected] wrote:

Thanks @slavasav - assume safe to close then? :)


Reply to this email directly or view it on GitHub.

@mosabua
Copy link
Member

mosabua commented Jan 29, 2016

Want to add closing this to the changelog @JohanLindquist ?

@nahojkap
Copy link
Member

nahojkap commented Feb 2, 2016

Sorry, missed this - what do you mean @mosabua ?

@mosabua
Copy link
Member

mosabua commented Feb 3, 2016

The changelog should ideally have links to any issues that were closed with any specific change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants