This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

dm3730 android usb

Hi ,

I'm trying to use a usb as external flash for exporting files from android.

i configured the kernel for USB but still getting:

D/Vold    (   62): usb_configuration switch is not enabled in the kernel.


In addition every time i'm using the usb class of the google api add-on (for android-10) the system crashes:

I/dalvikvm(  447): Could not find method com.android.future.usb.UsbManager.getInstance, referenced from method xx.export.WriteXMLFile.doInBackground
W/dalvikvm(  447): VFY: unable to resolve static method 18945: Lcom/android/future/usb/UsbManager;.getInstance (Landroid/content/Context;)Lcom/android/future/usb/UsbManager;
D/dalvikvm(  447): VFY: replacing opcode 0x77 at 0x00e6
D/dalvikvm(  447): VFY: dead code 0x00e9-012c in Lnatus/export/WriteXMLFile;.doInBackground ([Ljava/lang/String;)Ljava/lang/String;
D/dalvikvm(  285): GC_CONCURRENT freed 519K, 47% free 3857K/7175K, external 1488K/1828K, paused 3ms+7ms
E/WriteXMLFile(  447): Field is null. Ignoring...
E/WriteXMLFile(  447): Field is null. Ignoring...
E/WriteXMLFile(  447): Field is null. Ignoring...
E/WriteXMLFile(  447): Field is null. Ignoring...
E/WriteXMLFile(  447): Field is null. Ignoring...
W/dalvikvm(  447): threadid=11: thread exiting with uncaught exception (group=0x401dd560)
E/AndroidRuntime(  447): FATAL EXCEPTION: AsyncTask #1
E/AndroidRuntime(  447): java.lang.RuntimeException: An error occured while executing doInBackground()
E/AndroidRuntime(  447):     at android.os.AsyncTask$3.done(AsyncTask.java:200)
E/AndroidRuntime(  447):     at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:274)
E/AndroidRuntime(  447):     at java.util.concurrent.FutureTask.setException(FutureTask.java:125)
E/AndroidRuntime(  447):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:308)
E/AndroidRuntime(  447):     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
E/AndroidRuntime(  447):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088)
E/AndroidRuntime(  447):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581)
E/AndroidRuntime(  447):     at java.lang.Thread.run(Thread.java:1019)
E/AndroidRuntime(  447): Caused by: java.lang.NoClassDefFoundError: com.android.future.usb.UsbManager
E/AndroidRuntime(  447):     at xx.export.WriteXMLFile.doInBackground(WriteXMLFile.java:262)
E/AndroidRuntime(  447):     at xx.export.WriteXMLFile.doInBackground(WriteXMLFile.java:1)
E/AndroidRuntime(  447):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
E/AndroidRuntime(  447):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306)
E/AndroidRuntime(  447):     ... 4 more

there are no problems when compiling, also I've  added "android.hardware.usb.host.xml" to /system/etc/permissions.

also in the manifest i've added <uses-feature android:name="android.hardware.usb.host" />.

if adding  <uses-library android:name="com.android.future.usb.accessory" /> then the app doesn't load.

any help appreciated.