当我尝试使用von Richthofen
时,出现以下错误:
Panorama.PanoramaApi.loadPanoramaInfo()
我的代码是
09-19 18:30:30.009 18751-18751/com.my.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.my.example, PID: 18751
java.lang.IllegalArgumentException: GoogleApiClient is not configured to use the API required for this call.
at com.google.android.gms.common.internal.zzab.zzb(Unknown Source)
at com.google.android.gms.internal.zzpy.zzc(Unknown Source)
at com.google.android.gms.internal.zzuw.loadPanoramaInfo(Unknown Source)
at com.ndguide.imageslideshow.adapter.poiSlideAdapter$1.onClick(poiSlideAdapter.java:62)
at android.view.View.performClick(View.java:5204)
at android.view.View$PerformClick.run(View.java:21153)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
我了解到我必须使用Google API控制台启用Panorama API,但我找不到它。
请问如何解决?
答案 0 :(得分:0)
根据Panorama documentation,您必须在GoogleApiClient.Builder
上致电addApi()并传递Panorama.API
以使用Panorama API。