[Android-tools-devel] Regarding android-platform-tools-base

Markus Koschany apo at debian.org
Tue Jun 28 08:23:20 UTC 2016


On 27.06.2016 19:08, Chirayu Desai wrote:
> Hi,
> 
> I'm trying to build an android app using the package
> android-platform-tools-base for the android libraries (jars), instead of
> downloading them from maven central or bintray.
> 
> The app I'm building is at [1], and apart from that I have done a simple
> 'cp /etc/maven/settings-debian.xml .m2/settings.xml' to use
> /usr/share/maven-repo as the local maven repo.

Ok, to get to the root of this issue, I suggest to do it the Debian way
and create a simple package for your example application. We never use
Maven in this way to build a package and this might simply hide something.

So create an original tarball (even if it only includes a single file)
and a separate Debian directory with all basic files.

> 
> [1]: https://gitlab.com/cde/AndroidHelloWorld/blob/debian-test/build.gradle
> 
> The debian maven-repo currently does not contain all the jars built by
> android-platform-tools-base, and those are installed to
> /usr/share/android-platform-tools-base directly as jars. Bug #819074 is
> related, hc has compiled a list of the pom files needed to get these
> installed as maven artifacts.
> 
> Right now what I'm trying to do it use the jars directly from
> /usr/share/android-platform-tools-base, by using gradle flatDIr, and
> then the rest by using mavenLocal() (See [1] above)
> 
> However, the build fails with [2].
> The error mentions "Caused by: java.lang.NoClassDefFoundError:
> com/android/utils/ILogger", however that class is included in
> /usr/share/maven-repo/com/android/tools/common/24.5.0/common-24.5.0.jar
> 
> [2]: http://ix.io/Xj8
> 
> Now, I'm pretty sure I have got confused somewhere in my understanding
> of the whole build tools jars / gradle / maven interaction, and I
> haven't had too much time to clear that up due to exams, so any hints
> would be appreciated.

It is easier to understand if you always try to use Debian's point of
view here because in the end the package should be buildable in clean
chroot environment without internet access.

Your build-dependencies should include: gradle-debian-helper,
default-jdk, android-framework-tools-base and
libandroid-tools-common-java. Your flatDir directories should point to
/usr/share/android-platform-tools-base and /usr/share/java (for
libandroid-tools-common-java).

Let's see if we can narrow down the problem this way.

> 
> Note: While this build was done with the package 'android-sdk', some
> components were replaced / added from google's sdk temporarily, to test
> this.
> See #827214 and #827216
> 
> Regards,
> Chirayu Desai


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/android-tools-devel/attachments/20160628/ae4d13b3/attachment.sig>


More information about the Android-tools-devel mailing list