与Google Play服务相关的Android Studio错误

时间:2016-06-25 10:19:18

标签: android-studio webview google-play-services

我在使用Android Studio构建签名的apk时遇到这些错误。请帮我构建应用程序。

1

  

错误:(42,28)找不到与给定名称匹配的资源(at   'value'的值为'@ integer / google_play_services_version')。

2

  

错误:任务':app:processDebugResources'的执行失败。    com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令   '/home/dna/Android/Sdk/build-tools/23.0.2/aapt''完成了   非零退出值1

这是我的AndroidManifest.xml文件

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="appen.woltlab_bb"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="15"
        android:targetSdkVersion="23" />

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="appen.woltlab_bb.SplashScreen"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name="appen.woltlab_bb.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="appen.woltlab_bb.MAINACTIVITY" />

                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>
        <!--
 ATTENTION: This was auto-generated to add Google Play services to your project for
     App Indexing.  See https://g.co/AppIndexing/AndroidStudio for more information.
        -->
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>

</manifest>

1 个答案:

答案 0 :(得分:0)

我修好了。这是由于我意外地从类似项目中包含一些自动生成的API索引代码而导致的。如果您遇到此问题,请从头开始,并小心从先前项目导入的内容。