Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
'Calendar Demo' android sample throws 'Java.Long.NoClassDefFoundError' with configuration "(17 (JellyBean), Samsung Galaxy S2 (2.3.3))".
Step to reproduce:
1. Open Calendar Demo android sample
2. Set Minimun Android Version to 'Android 2.2, API-8' from Option-> Build-> Android Application
3. Set Target Framework to 'Android 4.2 (Jelly Bean)'
4. Debug the application on Samsung Galaxy S2 (2.3.3) device
Application throws 'Java.Long.NoClassDefFoundError' error.
Note : This is working fine if we run this application without making any change on Android 4.2.2 (Jelly Bean) Samsung S4 device.
Application should build and deploy successfully.
Android Device log: https://gist.github.com/atin360/47ada35416e78f99c51d
An update in above issue:
XS 4.0.11(Build 6)
This sample explicitly sets the minimum target framework to 4.0, which is
intentional as it calls into API 4.0. The NoClassDefFoundError you are hitting
is because the majority of this sample was written with android 4.0+ API, which
won't exist when targeting or attempting to deploy to anything < 4.0
Remember from our conversation Saurabh - you should only change the Minimum Android version if there is not one set already.
When the minimum is set, it's set for a reason.
That being said, now that we use TargetFramework by default, it would be helpful for 360logica if the minimum version was set explicitly for samples that can be tested on lower API levels. I've added a card for this here: https://trello.com/c/oW9lxjGl/89-set-android-minsdkversion-for-all-samples
This also would prevent a lot of confusion from customers who may install API 17 and then try to run a sample app on their ICS device. It's not really a great idea to assume that first time users will have a device at the exact API level that has been installed.
We avoid some of the pain now by only installing up to API 15, but we should perhaps consider adding some very descriptive error messages that point people at the AndroidManifest.xml and a document describing the difference between target, compile target, and minSDKversion.