zoukankan      html  css  js  c++  java
  • @integer/google_play_services_version

    Problem:

    When upgrading my project to the latest version of Google Play Services (v4.0, released on Halloween 2013), you are now supposed to add a new tag into the AndroidManifest.xml file.
    
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
    Unfortunately, when I try doing that, I then get this compile error:
    
    android-apt-compiler: /blahblah/AndroidManifest.xml:409: error: Error: No resource found that matches the given name (at 'value' with value '@integer/google_play_services_version').
    I can then navigate to the file at google-play-services_lib/res/values/version.xml and view the raw integer for that symbol:
    
    <integer name="google_play_services_version">4030500</integer>
    And then insert it back into my AndroidManifest.xml:
    
    <meta-data
        android:name="com.google.android.gms.version"
        android:value="4030500" />
    Doing this works absolutely fine and I can then compile and run the project and app just fine. But it's definitely an undesirable fix with obvious upgradability issues.

    解决:

    So for everyone using eclipse, this is how it's done:
    
    Eclipse -> import -> existing android code -> browse -> navigate to google-play-services_lib FOLDER (android-sdk/extras/google/google_play_services/libproject).
    
    then, on your project, control click -> properties -> android -> libraries, add -> select the project you just imported -> ok
  • 相关阅读:
    C++概念性总结
    友元函数
    C++指针概念
    Linux下多线程(clone()线程)
    Qt5模块化详细总结
    C++有符号与无符号之间的转换问题
    使用C++test工具做Qt代码静态分析
    QT函数带有外部链接但没有在头文件中声明(QT noreturn属性添加)
    Linux之Docker手动创建Docker容器
    我在思考一个很变态的社会趋向
  • 原文地址:https://www.cnblogs.com/scaptain/p/4103586.html
Copyright © 2011-2022 走看看