Rumah > Soal Jawab > teks badan
看到Android SDK里有AVFile(java.lang.String name, java.lang.String url)
,但在doc中没有任何说明,url参数是指文件的URL路径吗?试了一下直接通过AVFile.saveInBackground()
上传图片,报了如下错误:
03-25 20:06:24.829: W/dalvikvm(22212): Unable to resolve superclass of Lcom/avos/avoscloud/AVMultiPartEntity; (1696)
03-25 20:06:24.829: W/dalvikvm(22212): Link of class 'Lcom/avos/avoscloud/AVMultiPartEntity;' failed
03-25 20:06:24.829: E/dalvikvm(22212): Could not find class 'com.avos.avoscloud.AVMultiPartEntity', referenced from method com.avos.avoscloud.QiniuUploader.doWork
03-25 20:06:24.829: W/dalvikvm(22212): VFY: unable to resolve new-instance 923 (Lcom/avos/avoscloud/AVMultiPartEntity;) in Lcom/avos/avoscloud/QiniuUploader;
03-25 20:06:24.829: W/dalvikvm(22212): Unable to resolve superclass of Lcom/avos/avoscloud/AVMultiPartEntity; (1696)
03-25 20:06:24.829: W/dalvikvm(22212): Link of class 'Lcom/avos/avoscloud/AVMultiPartEntity;' failed
03-25 20:06:25.199: D/===AVOS Cloud===(22212): AVFile$AVDownloader->doWork->764: localPath:/data/data/com.holesecret/files/ec4149fe5739e0bcb9bfed615fe6474b
03-25 20:06:25.479: W/dalvikvm(22212): threadid=14: thread exiting with uncaught exception (group=0x413bb438)
03-25 20:06:25.489: E/AVUncaughtExceptionHandler(22212): AVUncaughtExceptionHandler caught a NoClassDefFoundError exception
03-25 20:06:25.549: E/(22212): generic statfs: /data , size: 85507
03-25 20:06:25.549: E/(22212): generic statfs: /data , size: 85507
03-25 20:06:25.629: D/dalvikvm(22212): GC_CONCURRENT freed 451K, 7% free 8640K/9287K, paused 12ms+25ms, total 74ms
03-25 20:06:25.629: D/dalvikvm(22212): WAIT_FOR_CONCURRENT_GC blocked 51ms
03-25 20:06:25.679: D/dalvikvm(22212): GC_FOR_ALLOC freed 373K, 8% free 8626K/9351K, paused 22ms, total 25ms
03-25 20:06:25.739: E/AndroidRuntime(22212): FATAL EXCEPTION: Thread-3026
03-25 20:06:25.739: E/AndroidRuntime(22212): java.lang.NoClassDefFoundError: com.avos.avoscloud.AVMultiPartEntity
03-25 20:06:25.739: E/AndroidRuntime(22212): at com.avos.avoscloud.QiniuUploader.doWork(QiniuUploader.java:77)
03-25 20:06:25.739: E/AndroidRuntime(22212): at com.avos.avoscloud.AVUploader$1.run(AVUploader.java:36)
03-25 20:06:25.739: E/AndroidRuntime(22212): at java.lang.Thread.run(Thread.java:856)
请问是不是暂时没有这样的功能?我的调用代码很简单:
AVFile image = new AVFile("test.jpg", "http://img3.douban.com/icon/u81973751-1.jpg");
image.saveInBackground();