我正在尝试运行 Google Drive 快速入门示例,但我总是会遇到 RuntimeException。这似乎来自我使用的 API 的深处。
有没有人有同样的问题然后我可以帮助我解决它?这是我的错误代码。
12-20 19:19:54.920: E/AndroidRuntime(15682): FATAL EXCEPTION: Thread-2016 12-20 19:19:54.920: E/AndroidRuntime(15682): java.lang.NullPointerException 12-20 19:19:54.920: E/AndroidRuntime(15682): at java.net.URI.parseURI(URI.java:353) 12-20 19:19:54.920: E/AndroidRuntime(15682): at java.net.URI.<init>(URI.java:204) 12-20 19:19:54.920: E/AndroidRuntime(15682): at com.google.api.client.http.GenericUrl.<init>(GenericUrl.java:100) 12-20 19:19:54.920: E/AndroidRuntime(15682): at com.google.api.client.googleapis.media.MediaHttpUploader.upload(MediaHttpUploader.java:269) 12-20 19:19:54.920: E/AndroidRuntime(15682): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:408) 12-20 19:19:54.920: E/AndroidRuntime(15682): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:328) 12-20 19:19:54.920: E/AndroidRuntime(15682): at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:449) 12-20 19:19:54.920: E/AndroidRuntime(15682): at com.example.drivequickstart.MainActivity$1.run(MainActivity.java:97) 12-20 19:19:54.920: E/AndroidRuntime(15682): at java.lang.Thread.run(Thread.java:856) 12-20 19:19:55.100: D/OpenGLRenderer(15682): Flushing caches (mode 0) 12-20 19:19:55.130: D/OpenGLRenderer(15682): Flushing caches (mode 1) 12-20 19:20:19.750: I/Process(15682): Sending signal. PID: 15682 SIG: 9
我从 Drive Quickstarttutorial 复制了代码,这是一个 链接