Closed GoogleCodeExporter closed 9 years ago
Any workaround to be able to have all architecture libs present in original
dependency apklib?
Original comment by pena...@gmail.com
on 24 Jan 2014 at 12:57
It would be awesome if this could be corrected.
Original comment by ilantzco...@gmail.com
on 24 Jan 2014 at 1:41
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>
<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)
Original comment by pena...@gmail.com
on 28 Jan 2014 at 1:55
So your APK at least contains a /lib folder? Using any plugin from 3.6.x and
up, my resulting APK doesn't contain the /libs contents of the APKLIB that was
referenced in the APK project. The 3.5.x versions of the plugin work as
expected.
What is your pom configuration for the APKLIB dependency? Thanks in advance.
Original comment by j.bros...@gmail.com
on 5 Feb 2014 at 10:32
[deleted comment]
The whole pom.xml to include all architecture dependencies would something like:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>1.0.0</modelVersion>
<groupId>groupIdName</groupId>
<artifactId>artifactId</artifactId>
<version>my_version</version>
<packaging>apk</packaging>
<name>myApkApp</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<dependencies>
<dependency>
<!--android dependency-->
<groupId>android</groupId>
<artifactId>android</artifactId>
<version>4.2.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<!--my librery with 3 different architectures dependecy-->
<groupId>library</groupId>
<artifactId>library</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>apklib</type>
</dependency>
</dependencies>
<repositories>
<repository>
<id>my_nexus_repo</id>
<url><id>my_nexus_repo</id></url>
</repository>
</repositories>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<!--maven android plugin-->
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.8.2</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<!-- platform or api level (api level 4 = platform 1.6) -->
<platform>19</platform>
</sdk>
<!--needed to add the 3 architectures. Other wise it will add just armeabi-->
<ndkArchitecture>armeabi armeabi-v7a x86</ndkArchitecture>
</configuration>
</plugin>
</plugins>
</build>
</project>
But really important: maven android plugin version must be: 3.8.2 (with maven
3.1.1)
Original comment by pena...@gmail.com
on 5 Feb 2014 at 11:12
Here's what I tried:
1. using the example app from #444 as a starting point
2. added all architectures as per comment in #440 (so apklib has multiple
foo.so)
3. copied apklib1 into a apklib2 (changing references) and renamed the apklib2
versions to bar.so
4. modified the apk to depend on apklib2 instead of apklib1
I built all of them using the pull request in #444
Expectation was that the apk should contain multiple foo.so and multiple bar.so
Instead apklib2 output only contained bar.so files, so apk also only contained
those files
It appears that the apklib as a dependency of another apklib didn't get the
native dependencies copied in (and thus the same is true of the resulting apk)
Original comment by malac...@gmail.com
on 22 Mar 2014 at 9:14
It appears that apklib2 is not calling getNativeDependenciesArtifacts on
apklib1.
Original comment by malac...@gmail.com
on 22 Mar 2014 at 9:32
Looks like ApklibMojo.addNativeLibraries should be doing it. Investigating.
Original comment by malac...@gmail.com
on 22 Mar 2014 at 9:37
Issue was caused by the transitive apklibs only being checked if the native
libs dir didn't exist. Moved that logic outside the code block.
Pull request depends on the issue-444 pull request #313
https://github.com/jayway/maven-android-plugin/pull/314
Original comment by malac...@gmail.com
on 22 Mar 2014 at 10:02
We are no longer using the issue tracking system on Google Code. Please refile
this issue on https://github.com/jayway/maven-android-plugin/issues if you
still have this problem with the latest release of the Android Maven Plugin
Original comment by mosa...@gmail.com
on 19 May 2014 at 4:20
Original issue reported on code.google.com by
pern...@gmail.com
on 25 Nov 2013 at 11:27