我用 java sdk lean up 启动后本地运行,批量上传pc上的文件到服务端
AVFile avFile = AVFile.withAbsoluteLocalPath(f.getName(), f.getAbsolutePath());
avFile.saveInBackground();
抛出如下异常:
java.lang.NullPointerException
at com.avos.avoscloud.QiniuUploader.uploadWithBlocks(QiniuUploader.java:79)
at com.avos.avoscloud.QiniuUploader.doWork(QiniuUploader.java:64)
at com.avos.avoscloud.FileUploader.doWork(FileUploader.java:57)
at com.avos.avoscloud.HttpClientUploader$1.run(HttpClientUploader.java:83)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
是在jetty容器中运行的原因吗?求解决办法