Re: [android-building] Java heap space when build javalib.jar

657 views
Skip to first unread message

Conley Owens

unread,
Oct 8, 2012, 12:26:27 PM10/8/12
to android-...@googlegroups.com
Do you have 16GB of RAM/swap? Are you using a 64bit OS?

On Mon, Oct 8, 2012 at 3:26 AM, Hilda Chen <hilda.c...@gmail.com> wrote:
> Hi:
> I built android source code and get the error as following:
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at org.objectweb.asm.ByteVector.<init>(Unknown Source)
> at org.objectweb.asm.ClassWriter.toByteArray(Unknown Source)
> at
> com.android.tools.layoutlib.create.AsmGenerator.transform(AsmGenerator.java:333)
> at
> com.android.tools.layoutlib.create.AsmGenerator.generate(AsmGenerator.java:216)
> at com.android.tools.layoutlib.create.Main.main(Main.java:98)
> make: ***
> [out/host/common/obj/JAVA_LIBRARIES/temp_layoutlib_intermediates/javalib.jar]
> Error 1
>
> Is there someone know what can i do?
> I think the solution is that find the .mk file which is in the
> temp_layoutlib's father directory, But I didn't find it.
> Thanks!
> Hilda
> Hilda
>
> --
> You received this message because you are subscribed to the "Android
> Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en

Ying Wang

unread,
Oct 8, 2012, 1:19:14 PM10/8/12
to android-...@googlegroups.com
temp_layoutlib is defined in frameworks/base/tools/layoutlib/Android.mk.
Maybe you should try increasing the jvm heap of the rule by adding some "java -Xmxn...".

Jean-Baptiste Queru

unread,
Oct 9, 2012, 8:51:07 AM10/9/12
to android-...@googlegroups.com
The following command returns nothing. Somehow, you're not using an
AOSP tree. We can't help you.

find . -name Android.mk | xargs grep AsusReader

JBQ

On Tue, Oct 9, 2012 at 12:30 AM, Hilda Chen <hilda.c...@gmail.com> wrote:
> Thanks for your reply. I have another problem: make: ***
> [out/target/common/obj/APPS/AsusReader_intermediates/proguard.classes.jar]
> Error 1. I want to find the Android.mk that define the apps,Would you please
> tell me?
> And do you know the reason why this kind of problems are being?
> Thanks!.
>
> 在 2012年10月9日星期二UTC+8上午1时19分22秒,Ying Wang写道:
--
Jean-Baptiste M. "JBQ" Queru
Technical Lead, Android Open Source Project, Google.

Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.

Magnus Bäck

unread,
Oct 9, 2012, 8:53:22 AM10/9/12
to android-...@googlegroups.com
On Tuesday, October 09, 2012 at 03:30 EDT,
Hilda Chen <hilda.c...@gmail.com> wrote:

> Thanks for your reply. I have another problem: make: ***
> [out/target/common/obj/APPS/AsusReader_intermediates/proguard.classes.jar]
> Error 1.

You haven't included the actual error message, just make's announcement
that there was an error. That makes it impossible to help.

> I want to find the Android.mk that define the apps,Would you please
> tell me?

Your source tree apparently contains an Android.mk with the string
"AsusReader" in it. Finding that file should be trivial.

> And do you know the reason why this kind of problems are being?

AOSP doesn't contain an application named AsusReader. If you're having
problems building that application I suggest you ask whoever supplied
you with the source code.

--
Magnus Bäck
ba...@google.com

Magnus Bäck

unread,
Oct 9, 2012, 8:59:11 AM10/9/12
to android-...@googlegroups.com
On Monday, October 08, 2012 at 22:00 EDT,
Hilda Chen <hilda.c...@gmail.com> wrote:

> I am using 64bit os and 4G RAM.

4 GB RAM is probably insufficient. You can try without a -j option
to make. Making sure you have ample swap space could also help.
Otherwise you simply have to get more RAM, or build an older Android
release if that's an option. I'm not sure if I've built ICS on a 4 GB
machine, but Gingerbread and earlier certainly works.

--
Magnus Bäck
ba...@google.com
Reply all
Reply to author
Forward
0 new messages