mail-archives/monodroid/2011-December/007702.html

141 строка
7.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [mono-android] cant make package when referencing a .JAR lib.
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20cant%20make%20package%20when%20referencing%20a%20.JAR%20lib.&In-Reply-To=4EDF8922.1060805%40jpobst.com">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="007642.html">
<LINK REL="Next" HREF="007544.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[mono-android] cant make package when referencing a .JAR lib.</H1>
<B>Piotr Kryger</B>
<A HREF="mailto:monodroid%40lists.ximian.com?Subject=%5Bmono-android%5D%20cant%20make%20package%20when%20referencing%20a%20.JAR%20lib.&In-Reply-To=4EDF8922.1060805%40jpobst.com"
TITLE="[mono-android] cant make package when referencing a .JAR lib.">piotr.kryger at gmail.com
</A><BR>
<I>Fri Dec 9 09:50:28 EST 2011</I>
<P><UL>
<LI>Previous message: <A HREF="007642.html">[mono-android] cant make package when referencing a .JAR lib.
</A></li>
<LI>Next message: <A HREF="007544.html">[mono-android] Can't debug with Mono For Android 4.0 in VS 2010
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7702">[ date ]</a>
<a href="thread.html#7702">[ thread ]</a>
<a href="subject.html#7702">[ subject ]</a>
<a href="author.html#7702">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Thanks, setting build action to AndroidJavaLibrary fixed my problem.
2011/12/7 Jonathan Pobst &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">monkey at jpobst.com</A>&gt;
&gt;<i> Try changing your .jar file's build action to AndroidJavaLibrary.
</I>&gt;<i>
</I>&gt;<i> Adding the new action was supposed to be backwards compatible,
</I>&gt;<i> AndroidJavaSource is supposed to work for either .java or .jar, but maybe
</I>&gt;<i> it got busted.
</I>&gt;<i>
</I>&gt;<i> If that doesn't help, you can look at the command line VS or MD is using
</I>&gt;<i> to call javac and see if something is missing from it.
</I>&gt;<i>
</I>&gt;<i> Jonathan
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>&gt;<i> On 12/7/2011 6:36 AM, Piotr Kryger wrote:
</I>&gt;<i>
</I>&gt;&gt;<i> I have similar problem.
</I>&gt;&gt;<i> I use acra-4.2.3.jar and java class which imports some stuff from this
</I>&gt;&gt;<i> jar.
</I>&gt;&gt;<i> Build action for jar as well as for java class are AndroidJavaSource.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> When I try to deploy I see following lines:
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> (SignAndroidPackage target) (1) -&gt;
</I>&gt;&gt;<i> (_CompileJava target) -&gt; MyJavaClass.java(4,1): javac error :
</I>&gt;&gt;<i> package org.acra does not exist [XXX.csproj]
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> and more javac errors saying &quot;package does not exist&quot; or &quot;cannot find
</I>&gt;&gt;<i> symbol&quot;.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Same project deploys fine if jar file and java class are excluded.
</I>&gt;&gt;<i> Issue was not present prior to m4a 4.0 (I was using 1.2).
</I>&gt;&gt;<i> I use VisualStudio 2010 and JDK 1.6.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> 2011/12/6 warren burch &lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">warrenburch at gmail.com</A>
</I>&gt;&gt;<i> &lt;mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">warrenburch at gmail.com</A>&gt;**&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> This worked with the previous version of mono for android.
</I>&gt;&gt;<i> I use Google admobs JAR file, have a helper .JAVA class and a managed
</I>&gt;&gt;<i> caller.
</I>&gt;&gt;<i> Package complains that classes references that are within the JAR
</I>&gt;&gt;<i> file are
</I>&gt;&gt;<i> not available.
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> How can I make this work now?
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> Cheers
</I>&gt;&gt;<i> Warren
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> --
</I>&gt;&gt;<i> View this message in context:
</I>&gt;&gt;<i> <A HREF="http://mono-for-android.**1047100.n5.nabble.com/cant-**">http://mono-for-android.**1047100.n5.nabble.com/cant-**</A>
</I>&gt;&gt;<i> make-package-when-referencing-**a-JAR-lib-tp5051417p5051417.**html&lt;<A HREF="http://mono-for-android.1047100.n5.nabble.com/cant-make-package-when-referencing-a-JAR-lib-tp5051417p5051417.html">http://mono-for-android.1047100.n5.nabble.com/cant-make-package-when-referencing-a-JAR-lib-tp5051417p5051417.html</A>&gt;
</I>&gt;&gt;<i> Sent from the Mono for Android mailing list archive at Nabble.com.
</I>&gt;&gt;<i> ______________________________**_________________
</I>&gt;&gt;<i> Monodroid mailing list
</I>&gt;&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A> &lt;mailto:<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.</A>**ximian.com&lt;<A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A>&gt;
</I>&gt;&gt;<i> &gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> UNSUBSCRIBE INFORMATION:
</I>&gt;&gt;<i> <A HREF="http://lists.ximian.com/**mailman/listinfo/monodroid&lt;http://lists.ximian.com/mailman/listinfo/monodroid">http://lists.ximian.com/**mailman/listinfo/monodroid&lt;http://lists.ximian.com/mailman/listinfo/monodroid</A>&gt;
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> ______________________________**_________________
</I>&gt;&gt;<i> Monodroid mailing list
</I>&gt;&gt;<i> <A HREF="http://lists.ximian.com/mailman/listinfo/monodroid">Monodroid at lists.ximian.com</A>
</I>&gt;&gt;<i>
</I>&gt;&gt;<i> UNSUBSCRIBE INFORMATION:
</I>&gt;&gt;<i> <A HREF="http://lists.ximian.com/**mailman/listinfo/monodroid&lt;http://lists.ximian.com/mailman/listinfo/monodroid">http://lists.ximian.com/**mailman/listinfo/monodroid&lt;http://lists.ximian.com/mailman/listinfo/monodroid</A>&gt;
</I>&gt;&gt;<i>
</I>&gt;<i>
</I>&gt;<i>
</I>-------------- next part --------------
An HTML attachment was scrubbed...
URL: <A HREF="http://lists.ximian.com/pipermail/monodroid/attachments/20111209/4215dd02/attachment.html">http://lists.ximian.com/pipermail/monodroid/attachments/20111209/4215dd02/attachment.html</A>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="007642.html">[mono-android] cant make package when referencing a .JAR lib.
</A></li>
<LI>Next message: <A HREF="007544.html">[mono-android] Can't debug with Mono For Android 4.0 in VS 2010
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#7702">[ date ]</a>
<a href="thread.html#7702">[ thread ]</a>
<a href="subject.html#7702">[ subject ]</a>
<a href="author.html#7702">[ 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>