Hi
On 2011.09.23 21:33, Jonathan Pryor wrote:
On Sep 21, 2011, at 8:55 AM, Miljenko Cvjetko wrote:
ApiDemo.cs gets exception on line 84
list = list.OrderBy (p => (p.ActivityInfo.NonLocalizedLabel == null ? "" :
p.ActivityInfo.NonLocalizedLabel.ToString ()).ToString ()).ToList ();
...
09-21 12:36:47.620 E/dalvikvm( 519): Excessive JNI global references (2001)
09-21 12:36:47.620 E/dalvikvm( 519): VM aborting
09-21 12:36:47.620 I/mono ( 519): Stacktrace:
My guess is that you have the Android API Demo installed on your device. :-)
True. After removal everything was ok.
Native API demo was preinstalled in VirtualDevice...
Since Mono's API demo is (mostly) a port of the Android API Demo, it uses the same logic
to determine which activitites are "samples" (those with the category
Intent.CategorySampleCode). The result is that _lots_ of Activity instances get pulled in
(one GREF apiece), and then you look at the ActivityInfo property (another GREF apiece),
and then you read the PackageItemInfo.NonLocalizedLabel property (another GREF
apiece)...and pretty soon you're looking at a lot of GREFs.
Unfortunately, if this is the case the answer is "don't do that": either run on
Hardware (where the GREF limit is significantly higher), or uninstall the Android API
Demo (so that fewer activities are pulled in), or change the Mono API demo code so that
it looks for a different set of activities, e.g. look for a category in addition to
Intent.CategorySampleCode.
OK. We have removed it from device, but this leaves few questions opened:
1. how to add additional category?
Changing in obj\Debug\android\AndroidManifest.xml
<category android:name="android.intent.category.SAMPLE_CODE" />
to something else?!?
2. can this be done in project properties > Android Manifest
cannot see and find in whole solution anything related to SAMPLE_CODE
thanks + regards
mel
- Jon
--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rješenja/Solution Architect
Razvojni programer/Senior developer
Voditelj projekta/Project Manager
IX južna obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: [email protected]
w: http://www.holisticware.net
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid