saki4510t / UVCCamera

library and sample to access to UVC web camera on non-rooted Android device
3k stars 1.21k forks source link

Importing sample #67

Open rashmifiroz opened 8 years ago

rashmifiroz commented 8 years ago

Hi Saki,

Getting below error on importing usbCameraTest7 sample in Eclipse Neon and building.

PARSE ERROR: [2016-06-27 09:27:45 - USBCam] Dx unsupported class file version 52.0 ...while parsing com/serenegiant/usbcameratest7/R$xml.class [2016-06-27 09:27:45 - USBCam] Dx 12 errors; aborting [2016-06-27 09:27:45 - USBCam] Conversion to Dalvik format failed with error 1

Could you kindly help to resolve this error? Is it required to add the libuvccamera library to the sample? if so could you please help me with the steps to add it?

In WiKi page , it was mentioned If you want to build above sample project, just import the project to your IDE and run it. You don't need libUVCCamera library project to build sample unless you want to change/modify/add some features in JNI side.

Regards, Rashmi

saki4510t commented 8 years ago

Hi, Google already stop developing plugin for Eclipse now and I don't use eclipse for Android development now(and this repository also already converted to project for Android Studio). So this is just my assuming,

  1. make new Eclipse project
  2. manually copy all Java sources into your project with their directories.
  3. manually copy all shared libraries(.so) into you project.

As I tested, you can also import as gradle project and run all tasks in Eclipse but I don't recommend because we can't sourcecode-debug as Android app.

  1. add local.properties file and write sdk.dir and ndk.dir with your path.
  2. edit gradle-wrapper.properties file under {UVCCamera}/gradle/wrapper as follows;
    distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
  3. import all under UVCCamera as gradle project.
  4. if you see dialog to confirm whether you want to override existing eclipse project descriptors, you should Override (instead of Kepp) otherwise you can see errors in editor.
  5. Now you can execute all gradle tasks in Eclipse.