# Using .jar compiled in Elements in Android Studio

**URL:** https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018
**Category:** Elements
**Created:** [March 8, 2023, 11:51am UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018 "2023-03-08T11:51:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Mateusz\_Galazka](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/m/65b543/32.png) [@Mateusz\_Galazka](https://talk.remobjects.com/u/Mateusz_Galazka)
#### Post date: [March 8, 2023, 11:51am UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/1 "2023-03-08T11:51:33Z")

</div>

Hello,  
I want to use my elements compiled .jar in Android studio and with many dependencies I have  
`error reading /Users/mateusz/inprax/Android/biblioteki/inpx_android_wspolnex/Bin/Debug/inpx_android_wspolnex.jar; line too long`

The problem is related to :

### [Unable to read manifest file (line too long) during Java JAR packaging with Maven](https://www.igorkromin.net/index.php/2019/12/02/unable-to-read-manifest-file-line-too-long-during-java-jar-packaging-with-maven/)

Can you change generating Manifest.xml using information above or should I change it manually - will it work ?

**UPDATE**  
Changing file manually (adding two spaces on start and enter at the end of every dependency compiled properly in Android Studio).

Please make change in generating this file because changing this file manually after every build is not a solution.

Best regards  
Mateusz

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [March 8, 2023, 12:35pm UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/2 "2023-03-08T12:35:10Z")

</div>

> [@Mateusz\_Galazka](#):
>
> I want to use my elements compiled .jar in Android studio and with many dependencies I have  
> `error reading /Users/mateusz/inprax/Android/biblioteki/inpx_android_wspolnex/Bin/Debug/inpx_android_wspolnex.jar; line too long`

Hmm. this sounds like the compiler generates a bad/invalid `.jar`? it would be good if we can see this jar (at least), or possibly even the project that generates it, so I can log an issue for the compiler team. It’s a bit odd though, as a `.jar` is just a `.zip` file with java `.class` files.

What do you get when you run `ebuild --dump` on the`.jar`?

> [@Mateusz\_Galazka](#):
>
> ### [nable to read manifest file (line too long) during Java JAR packaging with Maven](https://www.igorkromin.net/index.php/2019/12/02/unable-to-read-manifest-file-line-too-long-during-java-jar-packaging-with-maven/)
> 
> Can you change generating Manifest.xml using information above or should I change it manually - will it work ?

Hmm, .jar files don’t contain the Android .manifest file, afaik? or do you mean the MANIFEST.MF file? i don’t see any super-long lines in that file (but again, seeing the jar might help).

(can I comment again what a stinking mess the Android tool chain is? a file length limit if 72? who invests this stuff?)

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [March 8, 2023, 12:36pm UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/3 "2023-03-08T12:36:09Z")

</div>

Logged as [bugs://E26442](https://www.remobjects.com/portal/bugs/?id=E26442).

---

<div class="post-metadata">

### Author: ![Mateusz\_Galazka](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/m/65b543/32.png) [@Mateusz\_Galazka](https://talk.remobjects.com/u/Mateusz_Galazka)
#### Post date: [March 8, 2023, 12:44pm UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/4 "2023-03-08T12:44:44Z")

</div>

> [@mh](#):
>
> Hmm, .jar files don’t contain the Android .manifest file, afaik? or do you mean the MANIFEST.MF file? i don’t see any super-long lines in that file (but again, seeing the jar might help).

Manifest.MF file

---

<div class="post-metadata">

### Author: ![Mateusz\_Galazka](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/m/65b543/32.png) [@Mateusz\_Galazka](https://talk.remobjects.com/u/Mateusz_Galazka)
#### Post date: [March 8, 2023, 12:45pm UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/5 "2023-03-08T12:45:59Z")

</div>

> [@mh](#):
>
> (can I comment again what a stinking mess the Android tool chain is? a file length limit if 72? who invests this stuff?)

Limit of line is 72 in manifest.MF

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [March 8, 2023, 12:46pm UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/6 "2023-03-08T12:46:33Z")

</div>

Fixed for `20230308-124406-elements-develop [water]`, retest appreciated.

---

<div class="post-metadata">

### Author: ![Mateusz\_Galazka](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/m/65b543/32.png) [@Mateusz\_Galazka](https://talk.remobjects.com/u/Mateusz_Galazka)
#### Post date: [March 8, 2023, 12:47pm UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/7 "2023-03-08T12:47:11Z")

</div>

> [@mh](#):
>
> Hmm. this sounds like the compiler generates a bad/invalid `.jar`? it would be good if we can see this jar (at least), or possibly even the project that generates it, so I can log an issue for the compiler team. It’s a bit odd though, as a `.jar` is just a `.zip` file with java `.class` files.

I will try of course. Thank you

---

<div class="post-metadata">

### Author: ![RemObjectsSoftware](https://talk.remobjects.com/user_avatar/talk.remobjects.com/remobjectssoftware/32/15947_2.png) [@RemObjectsSoftware](https://talk.remobjects.com/u/RemObjectsSoftware)
#### Post date: [March 8, 2023, 6:38pm UTC](https://talk.remobjects.com/t/using-jar-compiled-in-elements-in-android-studio/28018/8 "2023-03-08T18:38:45Z")

</div>

[bugs://E26442](https://www.remobjects.com/portal/bugs/?id=E26442) was closed as fixed.
