[android-developers] Java heap outofmemory during dex

2009-09-24 Thread whitech

hi all, I've meeting a problem here:
When I use ant to package my program, in the dex step, it crash like
below:

dex:
 [echo] Converting compiled files and external libraries into
release/classes.dex...
[apply] UNEXPECTED TOP-LEVEL ERROR:
[apply] java.lang.OutOfMemoryError: Java heap space
[apply] at java.util.Arrays.copyOf(Unknown Source)
[apply] at java.util.Arrays.copyOf(Unknown Source)
[apply] at java.util.ArrayList.ensureCapacity(Unknown Source)
[apply] at java.util.ArrayList.add(Unknown Source)
[apply] at com.android.dx.ssa.SCCP.addUsersToWorklist(SCCP.java:
106)
[apply] at com.android.dx.ssa.SCCP.simulatePhi(SCCP.java:188)
[apply] at com.android.dx.ssa.SCCP.simulateBlock(SCCP.java:199)
[apply] at com.android.dx.ssa.SCCP.run(SCCP.java:402)
[apply] at com.android.dx.ssa.SCCP.process(SCCP.java:84)
[apply] at com.android.dx.ssa.Optimizer.runSsaFormSteps
(Optimizer.java:161)
[apply] at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:
101)
[apply] at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:
74)
[apply] at com.android.dx.dex.cf.CfTranslator.processMethods
(CfTranslator.java:269)
[apply] at com.android.dx.dex.cf.CfTranslator.translate0
(CfTranslator.java:131)
[apply] at com.android.dx.dex.cf.CfTranslator.translate
(CfTranslator.java:85)
[apply] at com.android.dx.command.dexer.Main.processClass
(Main.java:297)
[apply] at com.android.dx.command.dexer.Main.processFileBytes
(Main.java:276)
[apply] at com.android.dx.command.dexer.Main.access$100(Main.java:
56)
[apply] at com.android.dx.command.dexer.Main$1.processFileBytes
(Main.java:228)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:134)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at com.android.dx.cf.direct.ClassPathOpener.process
(ClassPathOpener.java:108)
[apply] at com.android.dx.command.dexer.Main.processOne(Main.java:
245)
[apply] at com.android.dx.command.dexer.Main.processAllFiles
(Main.java:183)
[apply] at com.android.dx.command.dexer.Main.run(Main.java:139)

BUILD FAILED
F:\build.xml:30: The following error occurred while executing this
line:
F:\\android_build.xml:185: apply returned: 3

the total size of all the .class files is about 1m(space 1.7m), and
the biggest .class file is 87kb.

I've set the ANT-OPTS, but no matter what I try, it's invalid. Is
there a tag or something I can set to increase the heap?
Thank you.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Hold http request from webview

2009-08-12 Thread whitech

Hi~~Now I'm facing this problem:
I want to hold part of http requests which send by webview, and send
after modified. How should I do?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Does WebView support local proxy?

2009-08-11 Thread whitech

Here's my problem.
When connecting the internet, sometimes I want to do it via a local
proxy, maybe let the request url append 127.0.0.1 at the head. How
can I implement it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Catching memory exception

2009-08-04 Thread whitech

thank you, I can catch the error now. I've use catch(Exception) not
catch(Error) before so I can't catch it.
There is another problem, can I push the limit of memory higher? It is
a little too small with only 16 MB

On 8月4日, 上午2时14分, fadden thefad...@gmail.com wrote:
 On Aug 2, 8:01 pm,whitechwhit...@163.com wrote:

  Hi all. I've got this problem:
  When my program using too much memory, it die. Is there an exception
  or something else to warn me? How can I catch it?

 What exception is appearing in the log file when your application
 dies?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Catching memory exception

2009-08-04 Thread whitech

Oh so sorry to hear that
Thank you.
There's another problem, is there some way to know how many memory my
program is using ?

On 8月4日, 下午6时39分, Mark Murphy mmur...@commonsware.com wrote:
 whitechwrote:
  There is another problem, can I push the limit of memory higher? It is
  a little too small with only 16 MB

 Not without changing the firmware.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://twitter.com/commonsguy

 Android Training in Germany, 18-22 January 2010:http://bignerdranch.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Catching memory exception

2009-08-04 Thread whitech

Thank you.
But I'm  wondering if I can know how much memory I'm using in my
program so I can do some tractic in using memory. Is there some API
for us to use?

On 8月5日, 上午10时38分, caval cavalzh...@gmail.com wrote:
 Firstly you can enter into the shell mode by typing adb shellthen because
 android has a linux heart so you can type ps
 to see all process's status which also including mem info.

 Regards,
 Caval.

 2009/8/5 whitech whit...@163.com





  Oh so sorry to hear that
  Thank you.
  There's another problem, is there some way to know how many memory my
  program is using ?

  On 8月4日, 下午6时39分, Mark Murphy mmur...@commonsware.com wrote:
   whitechwrote:
There is another problem, can I push the limit of memory higher? It is
a little too small with only 16 MB

   Not without changing the firmware.

   --
   Mark Murphy (a Commons Guy)http://commonsware.com|
 http://twitter.com/commonsguy

   Android Training in Germany, 18-22 January 2010:http://bignerdranch.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Monitoring memory in program

2009-08-03 Thread whitech

Hi all. I've got a problem here.
If my program needs a lot of memory, and may lead the out of memory
error happen, is there an exception or something else will throw ? If
there is, how to catch it?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Catching memory exception

2009-08-03 Thread whitech

Hi all. I've got this problem:
When my program using too much memory, it die. Is there an exception
or something else to warn me? How can I catch it?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Catching memory exception

2009-08-03 Thread whitech

Uncaught handler: thread main exiting due to uncaught exception
java.lang.OutOfMemoryError
 at xx

On 8月4日, 上午2时14分, fadden thefad...@gmail.com wrote:
 On Aug 2, 8:01 pm,whitechwhit...@163.com wrote:

  Hi all. I've got this problem:
  When my program using too much memory, it die. Is there an exception
  or something else to warn me? How can I catch it?

 What exception is appearing in the log file when your application
 dies?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---