зеркало из https://github.com/mono/mail-archives.git
154 строки
5.5 KiB
HTML
154 строки
5.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [mono-android] Mono for Android 4 - Constructor injection causes packaging failure.
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Mono%20for%20Android%204%20-%20Constructor%20injection%20causes%0A%20packaging%20failure.&In-Reply-To=">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
|
<LINK REL="Previous" HREF="007683.html">
|
|
<LINK REL="Next" HREF="007734.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[mono-android] Mono for Android 4 - Constructor injection causes packaging failure.</H1>
|
|
<B>SpiritMachine</B>
|
|
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20Mono%20for%20Android%204%20-%20Constructor%20injection%20causes%0A%20packaging%20failure.&In-Reply-To="
|
|
TITLE="[mono-android] Mono for Android 4 - Constructor injection causes packaging failure.">psynaptic_accelerator at yahoo.com
|
|
</A><BR>
|
|
<I>Wed Dec 7 16:33:42 EST 2011</I>
|
|
<P><UL>
|
|
<LI>Previous message: <A HREF="007683.html">[mono-android] DatePicker events
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007734.html">[mono-android] Mono for Android 4 - Constructor injection causes packaging failure.
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7669">[ date ]</a>
|
|
<a href="thread.html#7669">[ thread ]</a>
|
|
<a href="subject.html#7669">[ subject ]</a>
|
|
<a href="author.html#7669">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Hi everyone,
|
|
|
|
I had a functional application working fine, using TinyIoC for DI.
|
|
|
|
In particular one of my classes looks like this:
|
|
|
|
public class ProcessLogin : AsyncCommand<string, int, CommandResult>
|
|
{
|
|
private IDataService _dataService;
|
|
private Context _context;
|
|
private ProgressDialog _progressDialog;
|
|
private Action<CommandResult> _callback;
|
|
|
|
public ProcessLogin(IDataService dataService) { _dataService =
|
|
dataService; }
|
|
......
|
|
|
|
After upgrading to the latest MonoDroid, packaging the app fails and I get
|
|
the following in the output:
|
|
|
|
...
|
|
AddOnPlatformLibraries:
|
|
E:\Program Files (x86)\Java\jdk1.6.0_24\bin\javac.exe -d
|
|
obj\Debug\android\bin\classes -classpath "C:\Program Files (x86)\Reference
|
|
Assemblies\Microsoft\Framework\MonoAndroid\v2.2\mono.android.jar"
|
|
-bootclasspath "E:\Program Files
|
|
(x86)\Android\android-sdk\platforms\android-8\android.jar" -encoding UTF-8
|
|
"@C:\Users\Administrator\AppData\Local\Temp\tmp3959.tmp"
|
|
obj\Debug\android\src\pique\mobility\apps\whereru\commands\ProcessLogin.java(26,3):
|
|
error : cannot find symbol [F:\Git\Pique
|
|
Softworks\Pique.Mobility.Apps.WhereRU\src\Pique.Mobility.Apps.WhereRU\Pique.Mobility.Apps.WhereRU.csproj]
|
|
obj\Debug\android\src\pique\mobility\apps\whereru\commands\ProcessLogin.java(26,3):
|
|
error : symbol : constructor AsyncCommand_3(java.lang.Object) [F:\Git\Pique
|
|
Softworks\Pique.Mobility.Apps.WhereRU\src\Pique.Mobility.Apps.WhereRU\Pique.Mobility.Apps.WhereRU.csproj]
|
|
obj\Debug\android\src\pique\mobility\apps\whereru\commands\ProcessLogin.java(26,3):
|
|
error : location: class pique.mobility.utilities.android.AsyncCommand_3
|
|
[F:\Git\Pique
|
|
Softworks\Pique.Mobility.Apps.WhereRU\src\Pique.Mobility.Apps.WhereRU\Pique.Mobility.Apps.WhereRU.csproj]
|
|
obj\Debug\android\src\pique\mobility\apps\whereru\commands\ProcessLogin.java(26,3):
|
|
error : super (p0); [F:\Git\Pique
|
|
Softworks\Pique.Mobility.Apps.WhereRU\src\Pique.Mobility.Apps.WhereRU\Pique.Mobility.Apps.WhereRU.csproj]
|
|
obj\Debug\android\src\pique\mobility\apps\whereru\commands\ProcessLogin.java(26,3):
|
|
error : [F:\Git\Pique
|
|
Softworks\Pique.Mobility.Apps.WhereRU\src\Pique.Mobility.Apps.WhereRU\Pique.Mobility.Apps.WhereRU.csproj]
|
|
Note: Some input files use unchecked or unsafe operations.
|
|
Note: Recompile with -Xlint:unchecked for details.
|
|
1 error
|
|
...
|
|
|
|
If I fall back to setter injection, removing the constructor altogether and
|
|
including this line instead:
|
|
|
|
public IDataService DataService { get { return _dataService; } set {
|
|
_dataService = value; } }
|
|
|
|
everything works again.
|
|
|
|
Is there a way to disable the over-zealous safety checking? Seems like
|
|
constructor injection would be a fairly reasonable thing to be able to do.
|
|
|
|
Any suggestions welcome.
|
|
|
|
Thanks in advance,
|
|
|
|
Joe
|
|
|
|
|
|
--
|
|
View this message in context: <A HREF="http://mono-for-android.1047100.n5.nabble.com/Mono-for-Android-4-Constructor-injection-causes-packaging-failure-tp5057049p5057049.html">http://mono-for-android.1047100.n5.nabble.com/Mono-for-Android-4-Constructor-injection-causes-packaging-failure-tp5057049p5057049.html</A>
|
|
Sent from the Mono for Android mailing list archive at Nabble.com.
|
|
</PRE>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI>Previous message: <A HREF="007683.html">[mono-android] DatePicker events
|
|
</A></li>
|
|
<LI>Next message: <A HREF="007734.html">[mono-android] Mono for Android 4 - Constructor injection causes packaging failure.
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#7669">[ date ]</a>
|
|
<a href="thread.html#7669">[ thread ]</a>
|
|
<a href="subject.html#7669">[ subject ]</a>
|
|
<a href="author.html#7669">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
|
|
<hr>
|
|
<a href="http://lists.ximian.com/mailman/listinfo/monodroid">More information about the Monodroid
|
|
mailing list</a><br>
|
|
</body></html>
|