I'm trying to demo using Java Source code via JNI but having issues.

I created a new Mono 4 Android project.

I also created a simple Java file named Test.java.  Here is the contents of
Test.java:

[code]
package com.test;

public class Test
{
        public Test()
        {
        }
        
        public int add(int a, int b)
        {
                return a + b;
        }
}
[/code]

I went into project properties, created an Android Manifest, and then
changed package name to "com.test" to match the package name of my java
source file.  I also right clicked on Test.java and set Build Action =
"AndroidJavaSource".

Ok, I know I have to do more to get the JNI stuff working, but let's stop
right there, because I can no longer deploy to the emulator after changing
Build Action to "AndroidJavaSource".

The project builds fine but it errors out during the deploy process.  The
problem seems to be related to the following lines in the output console (If
you look at the javac command line parameters, it doesn't appear to be
including my Test.java source file as one of the parameters):

_CompileJava:
    JavaSourceFiles:
      Test.java
    JavaLibraries:
    AddOnPlatformLibraries:
  C:\Program Files (x86)\Java\jdk1.6.0_27\bin\javac.exe -d
obj\Debug\android\bin\classes -classpath "C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v2.1\mono.android.jar"
-bootclasspath
C:\Users\CSchulte\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK\android-sdk-windows\platforms\android-7\android.jar
-encoding UTF-8 "@C:\Users\CSchulte\AppData\Local\Temp\tmp5921.tmp" 
C:\Program Files
(x86)\MSBuild\Novell\Novell.MonoDroid.Common.targets(680,3): error MSB6006:
*"javac.exe" exited with code 1*. [C:\Users\CSchulte\Documents\Visual Studio
2010\Projects\testtesttest\testtesttest\testtesttest.csproj]
Done Building Project "C:\Users\CSchulte\Documents\Visual Studio
2010\Projects\testtesttest\testtesttest\testtesttest.csproj"
(SignAndroidPackage target(s)) -- FAILED.


--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Error-Deploying-Project-After-Including-Java-Source-file-tp5645351p5645351.html
Sent from the Mono for Android mailing list archive at Nabble.com.
_______________________________________________
Monodroid mailing list
Monodroid@lists.ximian.com

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

Reply via email to