草庐IT

android - Google Play 服务过期错误

coder 2023-11-27 原文

我遇到了 google-play-service 的问题。我正在使用 Google-API 进行 oAuth2 身份验证和日历/Gmail 信息。昨天一切正常,但今天他告诉我我需要更新版本的 Google PLay 服务。 Android Studio 今天早上更新了所有包。如果我开始联系 GoogleAPI,这是来自 Logcat 的错误行:

09-22 11:59:01.692: W/GooglePlayServicesUtil(2819): Google Play services out of date.  Requires 9683000 but found 9452480

这是我的 grade.build:

apply plugin: 'com.android.application'

android {
    signingConfigs {
        config {
            keyAlias XXXXX
            keyPassword XXXX
            storeFile file(XXXX)
            storePassword XXXXX
        }
    }
    compileSdkVersion 23
    buildToolsVersion '22.0.1'
    defaultConfig {
        applicationId XXXX
        minSdkVersion 14
        targetSdkVersion 22
        signingConfig signingConfigs.config
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
            signingConfig signingConfigs.config
        }
        debug {
            debuggable false
            jniDebuggable false
            signingConfig signingConfigs.config
            renderscriptDebuggable false
        }
    }
    productFlavors {
    }
}








dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile('com.google.api-client:google-api-client-android:1.22.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    compile('com.google.apis:google-api-services-gmail:v1-rev48-1.22.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    compile('com.google.apis:google-api-services-calendar:v3-rev212-1.22.0') {
        exclude group: 'org.apache.httpcomponents'
    }

    compile 'com.android.support:appcompat-v7:23.2.1'
    compile 'com.google.firebase:firebase-crash:9.6.0'
    compile 'joda-time:joda-time:2.4'
    compile 'com.google.android.gms:play-services-auth:9.6.0'
    compile 'pub.devrel:easypermissions:0.1.5'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:support-vector-drawable:23.4.0'
}



apply plugin: 'com.google.gms.google-services'

我一直在使用 com.google.android.gms:play-services-auth 版本 9.6.0。我不知道在哪里可以更改版本。

我试图吐出我的版本号,它给了我 213XXXX:

int test = R.integer.google_play_services_version;
        String test2 = test+"";
        Toast.makeText(this,test2, Toast.LENGTH_SHORT).show();

但错误消息显示不同的版本号:

09-22 13:28:26.145: W/GooglePlayServicesUtil(3334): Google Play services out of date.  Requires 9683000 but found 9452480

非常感谢, j.母鹿 ;)

最佳答案

我认为关于您收到的错误“Google Play Services out of date on API 23”还有一个悬而未决的问题此外,此类问题是在 2013 年将 SDK 更新到 18 时出现的。只需检查 link了解更多相关信息。

我可以建议您更新对最新版本的依赖。更新后,在测试应用程序时创建一个新的虚拟设备/模拟器。尝试使用 x86-64 版本的 API 23。

关于android - Google Play 服务过期错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39638586/

有关android - Google Play 服务过期错误的更多相关文章

  1. ruby - 使用 ruby​​ 和 savon 的 SOAP 服务 - 2

    我正在尝试使用ruby​​和Savon来使用网络服务。测试服务为http://www.webservicex.net/WS/WSDetails.aspx?WSID=9&CATID=2require'rubygems'require'savon'client=Savon::Client.new"http://www.webservicex.net/stockquote.asmx?WSDL"client.get_quotedo|soap|soap.body={:symbol=>"AAPL"}end返回SOAP异常。检查soap信封,在我看来soap请求没有正确的命名空间。任何人都可以建议我

  2. ruby - 具有身份验证的私有(private) Ruby Gem 服务器 - 2

    我想安装一个带有一些身份验证的私有(private)Rubygem服务器。我希望能够使用公共(public)Ubuntu服务器托管内部gem。我读到了http://docs.rubygems.org/read/chapter/18.但是那个没有身份验证-如我所见。然后我读到了https://github.com/cwninja/geminabox.但是当我使用基本身份验证(他们在他们的Wiki中有)时,它会提示从我的服务器获取源。所以。如何制作带有身份验证的私有(private)Rubygem服务器?这是不可能的吗?谢谢。编辑:Geminabox问题。我尝试“捆绑”以安装新的gem..

  3. ruby-on-rails - Rails 常用字符串(用于通知和错误信息等) - 2

    大约一年前,我决定确保每个包含非唯一文本的Flash通知都将从模块中的方法中获取文本。我这样做的最初原因是为了避免一遍又一遍地输入相同的字符串。如果我想更改措辞,我可以在一个地方轻松完成,而且一遍又一遍地重复同一件事而出现拼写错误的可能性也会降低。我最终得到的是这样的:moduleMessagesdefformat_error_messages(errors)errors.map{|attribute,message|"Error:#{attribute.to_s.titleize}#{message}."}enddeferror_message_could_not_find(obje

  4. ruby-on-rails - 启动 Rails 服务器时 ImageMagick 的警告 - 2

    最近,当我启动我的Rails服务器时,我收到了一长串警告。虽然它不影响我的应用程序,但我想知道如何解决这些警告。我的估计是imagemagick以某种方式被调用了两次?当我在警告前后检查我的git日志时。我想知道如何解决这个问题。-bcrypt-ruby(3.1.2)-better_errors(1.0.1)+bcrypt(3.1.7)+bcrypt-ruby(3.1.5)-bcrypt(>=3.1.3)+better_errors(1.1.0)bcrypt和imagemagick有关系吗?/Users/rbchris/.rbenv/versions/2.0.0-p247/lib/ru

  5. ruby-on-rails - s3_direct_upload 在生产服务器中不工作 - 2

    在Rails4.0.2中,我使用s3_direct_upload和aws-sdkgems直接为s3存储桶上传文件。在开发环境中它工作正常,但在生产环境中它会抛出如下错误,ActionView::Template::Error(noimplicitconversionofnilintoString)在View中,create_cv_url,:id=>"s3_uploader",:key=>"cv_uploads/{unique_id}/${filename}",:key_starts_with=>"cv_uploads/",:callback_param=>"cv[direct_uplo

  6. ruby-on-rails - 迷你测试错误 : "NameError: uninitialized constant" - 2

    我遵循MichaelHartl的“RubyonRails教程:学习Web开发”,并创建了检查用户名和电子邮件长度有效性的测试(名称最多50个字符,电子邮件最多255个字符)。test/helpers/application_helper_test.rb的内容是:require'test_helper'classApplicationHelperTest在运行bundleexecraketest时,所有测试都通过了,但我看到以下消息在最后被标记为错误:ERROR["test_full_title_helper",ApplicationHelperTest,1.820016791]test

  7. ruby-on-rails - 如何在 Rails View 上显示错误消息? - 2

    我是rails的新手,想在form字段上应用验证。myviewsnew.html.erb.....模拟.rbclassSimulation{:in=>1..25,:message=>'Therowmustbebetween1and25'}end模拟Controller.rbclassSimulationsController我想检查模型类中row字段的整数范围,如果不在范围内则返回错误信息。我可以检查上面代码的范围,但无法返回错误消息提前致谢 最佳答案 关键是您使用的是模型表单,一种显示ActiveRecord模型实例属性的表单。c

  8. 使用 ACL 调用 upload_file 时出现 Ruby S3 "Access Denied"错误 - 2

    我正在尝试编写一个将文件上传到AWS并公开该文件的Ruby脚本。我做了以下事情:s3=Aws::S3::Resource.new(credentials:Aws::Credentials.new(KEY,SECRET),region:'us-west-2')obj=s3.bucket('stg-db').object('key')obj.upload_file(filename)这似乎工作正常,除了该文件不是公开可用的,而且我无法获得它的公共(public)URL。但是当我登录到S3时,我可以正常查看我的文件。为了使其公开可用,我将最后一行更改为obj.upload_file(file

  9. ruby-on-rails - 错误 : Error installing pg: ERROR: Failed to build gem native extension - 2

    我克隆了一个rails仓库,我现在正尝试捆绑安装背景:OSXElCapitanruby2.2.3p173(2015-08-18修订版51636)[x86_64-darwin15]rails-v在您的Gemfile中列出的或native可用的任何gem源中找不到gem'pg(>=0)ruby​​'。运行bundleinstall以安装缺少的gem。bundleinstallFetchinggemmetadatafromhttps://rubygems.org/............Fetchingversionmetadatafromhttps://rubygems.org/...Fe

  10. ruby - #之间? Cooper 的 *Beginning Ruby* 中的错误或异常 - 2

    在Cooper的书BeginningRuby中,第166页有一个我无法重现的示例。classSongincludeComparableattr_accessor:lengthdef(other)@lengthother.lengthenddefinitialize(song_name,length)@song_name=song_name@length=lengthendenda=Song.new('Rockaroundtheclock',143)b=Song.new('BohemianRhapsody',544)c=Song.new('MinuteWaltz',60)a.betwee

随机推荐