草庐IT

OnConnectionFailedListener

全部标签

android - 在 AppCompatActivity 中启用 GoogleApiClient 时遇到问题

尝试按照Google的指南进行基本设置:mGoogleApiClient=newGoogleApiClient.Builder(this).enableAutoManage(this/*FragmentActivity*/,this/*OnConnectionFailedListener*/).addApi(Auth.GOOGLE_SIGN_IN_API,gso).build();OnConnectionFailedListener的第二个“this”失败Wrong2ndargumenttype.Found:'....HomeScreen',required:'com.google.a

android - 如果实现 GooglePlayServicesClient.ConnectionCallbacks/OnConnectionFailedListener,则找不到主 Activity 类

我根据googledoc开发了一个示例应用程序关于位置服务。运行它时,我发现MainActivityClass发生崩溃,但如果我删除位置回调GooglePlayServicesClient.ConnectionCallbacks和GooglePlayServicesClient.OnConnectionFailedListener的实现,它就会启动。我正在使用AndroidStudio,我非常确定我已经很好地配置了GooglePlay服务和AVD(Nexus7GoogleAPI19)。这是主要Activity:packagecom.demo.app;importandroid.supp