Answered by:
Problem with deploying APK which uses Android Binding Library and JAR

Question
-
User2943 posted
Hello.
I have a JAR file with one public class:
public class SampleClass { private int value; public SampleClass() { this.value = 0; } public SampleClass(int value) { this.value = value; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } }
I created the solution in Visual Studio 2012 and Android Application and Android Binding Library project in it. Added the JAR file to Jars folder in Android Binding Librarry project, specified the build action as EmbeddedJar as described here. Then added the library project to references of app project. http://screencast.com/t/c5iiFCE6 Everything compiles fine for me but when I try to deploy the APK to device via Visual Studio and start debugging I get the errors: http://paste.org.ru/?26bdpq
I also tried to create the class derived from my Java class inside binding library project but got the same result.
Am I missing any steps? Can anybody explain what I'm doing wrong here? (I attached the source code of my test solution to this post)
Monday, March 4, 2013 5:21 PM
Answers
-
User54 posted
Actually I was kind of wrong - it won't build unless you remove AndroidManifest.xml from the jar. It conflicts with the final application apk.
We'll make some change to internal build so that this sort of conflicts are only warned (which should be much better than non-understandable exception message) in the next version. So far please remove that file from the jar.
- Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
Tuesday, March 5, 2013 6:09 PM
All replies
-
User54 posted
Hello,
This should build, so it should be our bug. We will investigate this issue. Sorry for inconvenience.
If we could find any workaround we will post updates.
Tuesday, March 5, 2013 10:03 AM -
User54 posted
Actually I was kind of wrong - it won't build unless you remove AndroidManifest.xml from the jar. It conflicts with the final application apk.
We'll make some change to internal build so that this sort of conflicts are only warned (which should be much better than non-understandable exception message) in the next version. So far please remove that file from the jar.
- Marked as answer by Anonymous Thursday, June 3, 2021 12:00 AM
Tuesday, March 5, 2013 6:09 PM -
User2943 posted
That worked, thank you!
Tuesday, March 5, 2013 6:49 PM