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

Chirayu Desai chirayudesai1 at gmail.com
Tue Jun 28 09:23:35 UTC 2016


On Tue, Jun 28, 2016 at 1:53 PM, Markus Koschany <apo at debian.org> wrote:
> 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.
I can try that later (exam tomorrow, debconf after that)
Would there be any other preferred way to build an existing android
app in Debian?
>
> So create an original tarball (even if it only includes a single file)
> and a separate Debian directory with all basic files.
Will do.
>
>>
>> [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.
I tried to do that, didn't have a clean chroot but I did make sure all
dependencies used were installed by debian packages.
>
> 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).
I did that, just that (no mavenLocal()), and [1] is what i get from
(gradle build --stacktrace --debug)
I also re-ran a build with (gradle build --stacktrace --debug) with
the mavenLocal() config, the output is [2].
[1]: http://ix.io/XWZ
[2]: https://melange.googlesource.com/soc/
>
> Let's see if we can narrow down the problem this way.
I will try that and report back.
I have attached logs of what I did try already, but I'll also try the
same thing again in a clean chroot, as a package.
>
>>
>> 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
>
>
>
> _______________________________________________
> Android-tools-devel mailing list
> Android-tools-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel



More information about the Android-tools-devel mailing list