Hello Stack Overflow community,
I'm creating an Android app for an engineering project. The basic goal of the app is to remotely control an RC car via WiFi. The car has a camera and microphone mounted on it, and tran开发者_StackOverflowsmits video and voice wirelessly back to the control. We (the group) have a working Java app where the video transmission works perfectly via a wireless camera. I have the working Java code, but the code requires for .class files to function: aplug.class, aplug$AU.class, aplug$SI.class, and aplug$TS.class. In Eclipse, to get the program working I had to "Add External Class Library" to get the code to compile, and everything works fine. However, I can't seem to get past the declaration declaration line:
private aplug applet = new aplug();
I've tried "Add External Class Folder", and "Add Class Folder" in Eclipse, as well as "Configure Build Path", and right-clicking the classes -> "Add to Build Path", but nothing seems to work. I also tried
<uses-library>android:name="aplug.class" />
in the AndroidManifest.xml file. Does anybody know how to import these .class files so I can use them in my Android Project?
Thanks in advance!
Step #1: Package them as a JAR.
Step #2: Put the JAR in your libs/
directory.
Step #3: Choose Add JAR in the build path in Eclipse and add the reference to the JAR.
精彩评论