I've finally got to the root of this. As you suspected, I had a class derived
from Android.App.Application that had a [Application(Label = "MyApp")]
attribute. It looks like this was conflicting with the manifest, which had a
<application android:label="MyApp"> element. I've removed the attribute from
the class.

My application now deploys as Release, and it can access the remote web
services. I'm not sure why this deployment problem didn't show-up with the
Debug build, but its presumably due to some internal difference between
Debug and Release.

I'm also not clear on why a Debug build could access the internet even when
I removed the manifest file. Does a debug build have
android.permission.INTERNET by default somehow?

The build action for my manifest is still Content, although if I set it to
None then it still works. The default does seem to be Content. Here is what
I did to verify that:

1. Start VS2010.
2. Select File->New->Project.
3. Select "Mono for Android Application".
4. In Solution Explorer: right-click the project and click Properties.
5. On the properties page, go to the Android Manifest tab.
6. Click the "No AndroidManifest.xml found. Click to add one" label.
Manifest fields appear on the property page, and
Properties\AndroidManifest.xml file appears in solution explorer.
7. Right-click click Properties\AndroidManifest.xml in solution explorer.
8. Verify that Build Action in properties window is shown as Content.

I'm using Mono for Android 4.0.4 with VS2010 v10.0.30319.1RTMRel on Win7
x86.

Anyway, thank you very much for you help on all this.

Andy



--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/NameResolutionFailure-in-release-build-only-tp5585824p5589343.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to