I've just tried the same and assert doesn't work for me, too. Not that I need 
it much but since you were asking about others.
  ----- Original Message ----- 
  From: Dave Kong 
  To: [email protected] 
  Sent: Thursday, November 13, 2008 10:12 PM
  Subject: [android-beginners] Re: Does the native assert work at all with 
android emulator?


  Thanks fadden,

  I've given this a try using  "adb shell setprop dalvik.vm.enableassertions 
all", but the assert is still not firing. The precise order in which I 
performed the operations are:
  1) launch debug from eclipse.
  2) after emulator is up, run adb command from shell and set property as 
indicated in reference below.
  3) re-launch a new instance of debug app.
  4) "assert false" is not caught.

  Am I missing some other settings? I mean no one else seems to have this 
problem but me? (I can't find other thread about assert not working here.)


  On Thu, Nov 6, 2008 at 7:41 PM, fadden <[EMAIL PROTECTED]> wrote:


    On Nov 5, 10:28 am, "Dave Kong" <[EMAIL PROTECTED]> wrote:
    > My asserts in android code never fires even with -ea option for my java
    > runtime (set in eclipse).
    >
    > From this old post back in 2007, it seems to indicate that assert won't

    > work, and it suggests Assert class in junit 
instead.http://groups.google.com/group/android-developers/browse_thread/threa...

    Setting them on the Eclipse side won't help -- you need to have them
    enabled on the VM running in the emulator.

    This document ("Controlling the Embedded VM") explains how to enable
    them for apps running on the emulator:

     
http://git.source.android.com/?p=platform/dalvik.git;a=blob_plain;f=docs/embedded-vm-control.html;hb=HEAD

    These instructions don't currently work on a G1, because you can't
    change dalvik.* system properties from the adb shell.





  

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to