title: Error with google_play_services_version value from aar library
body: <p>I have library and project which depends on that library. Library is stored in my private maven repo as aar file. Library has different dependencies and one of them is google maps. So I specified it in build.gradle file and set meta-data tag inside lib manifest as   </p>
  
  <pre><code>&lt;meta-data 
          android:name="com.google.android.gms.version"
          android:value="@integer/google_play_services_version" /&gt;
  </code></pre>
  
  <p>When I try to compile my project there is an error </p>
  
  <blockquote>
    <p>No resource found that matches the given name (at 'value' with value
    '@integer/google_play_services_version')</p>
  </blockquote>
  
  <p>This is common error but I never saw problem as I described with aar file.  </p>
  
  <p>My lib build.gradle file  </p>
  
  <pre><code>apply plugin: 'com.android.library'
  apply plugin: 'com.jfrog.artifactory'
  apply plugin: 'maven-publish'
  
  def packageName = 'com.myapplib'
  def libraryVersion = '1.0.3'
  
  android {
      compileSdkVersion 22
      buildToolsVersion "22.0.1"
      publishNonDefault true
  
      defaultConfig {
          minSdkVersion 15
          targetSdkVersion 21
      }
  
      buildTypes {
  
          def BOOLEAN = "boolean"
          def TRUE = "true"
          def FALSE = "false"
          def LOG_HTTP_REQUESTS = "LOG_HTTP_REQUESTS"
          def LOG_IMAGES_REQUESTS = "LOG_IMAGES_REQUESTS"
          def REPORT_CRASHES = "REPORT_CRASHES"
          def TRACK_GTM = "TRACK_GTM"
  
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
              buildConfigField  BOOLEAN, LOG_IMAGES_REQUESTS, FALSE
              buildConfigField  BOOLEAN, LOG_HTTP_REQUESTS, FALSE
              buildConfigField  BOOLEAN, TRACK_GTM, TRUE
              buildConfigField  BOOLEAN, LOG_ERRORS_WITH_GTM, TRUE
              buildConfigField  BOOLEAN, REPORT_CRASHES, TRUE
          }
          debug {
              ext.enableCrashlytics = false
              buildConfigField  BOOLEAN, LOG_IMAGES_REQUESTS, TRUE
              buildConfigField  BOOLEAN, LOG_HTTP_REQUESTS, TRUE
              buildConfigField  BOOLEAN, TRACK_GTM, FALSE
              buildConfigField  BOOLEAN, LOG_ERRORS_WITH_GTM, FALSE
              buildConfigField  BOOLEAN, REPORT_CRASHES, FALSE
          }
      }    
  }
  
  dependencies {
      compile 'org.apache.commons:commons-lang3:3.1'
      compile('com.crashlytics.sdk.android:crashlytics:2.3.2@aar') {
          transitive = true;
      }
      compile 'com.android.support:support-v4:22.1.+'
      //Explicitly specified maps version
      compile('com.google.android.gms:play-services-maps:7.5.0@aar') {
          transitive = true;
      }
  }
  
  publishing {
      publications {
          aar(MavenPublication) {
              groupId packageName
              version = libraryVersion
              artifactId project.getName()
  
              // Tell maven to prepare the generated "*.aar" file for publishing
              artifact("$buildDir/outputs/aar/${project.getName()}-release.aar")
          }
      }
  }
  
  artifactory {
      contextUrl = 'http://myapp.com/artifactory'
      publish {
          repository {
              // The Artifactory repository key to publish to
              repoKey = 'libs-release-local'
  
              username = "admin"
              password = "password"
          }
          defaults {
              // Tell the Artifactory Plugin which artifacts should be published to Artifactory.
              publications('aar')
              publishArtifacts = true
  
              // Properties to be attached to the published artifacts.
              properties = ['qa.level': 'basic', 'dev.team': 'core']
              // Publish generated POM files to Artifactory (true by default)
              publishPom = true
          }
      }
  }
  </code></pre>
  
  <p>lib Manifest   </p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  package="com.myapplib"
  android:versionCode="4"
  android:versionName="1.0.3"&gt;
  
  &lt;uses-sdk
      android:minSdkVersion="15"
      android:targetSdkVersion="21" /&gt;
  
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /&gt;
  &lt;uses-permission android:name="android.permission.WAKE_LOCK" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt;
  &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt;
  
  &lt;application
      android:name="com.myapplib.app.MyApplication"
      android:allowBackup="true"
      android:icon="@drawable/ic_logo"
      android:theme="@style/AppTheme" &gt;
      &lt;meta-data
          android:name="com.google.android.gms.version"
          android:value="@integer/google_play_services_version" /&gt;
      &lt;activity
          android:name="com.myapplib.gui.LaunchActivity"
          android:label="@string/app_name" &gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="com.myapplib.gui.LandingPageActivity"
          android:noHistory="true"
          android:label="@string/app_name" &gt;
      &lt;/activity&gt;
      &lt;activity
          android:name="com.myapplib.gui.PreferenceActivity"
          android:noHistory="true"
          android:label="@string/app_name" &gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>My project Manifest  </p>
  
  <pre><code>&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  package="com.myapp"
  android:versionCode="8"
  android:versionName="1.0.7"&gt;
  
  &lt;application
      android:name="com.myapp.app.MyApplication"
      android:allowBackup="true"
      android:icon="@drawable/app_logo"
      android:label="@string/app_name"
      android:largeHeap="true"
      android:theme="@style/AppTheme"
      tools:replace="icon"&gt;
      &lt;meta-data
          android:name="com.google.android.maps.v2.API_KEY"
          android:value="@string/google_api_key" /&gt;
  
      &lt;meta-data
          android:name="com.crashlytics.ApiKey"
          android:value="${crashlytics-api-key}" /&gt;
  &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>
  
  <p>my app build.gradle   </p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  apply plugin: 'io.fabric'
  
  android {
      compileSdkVersion 15
      buildToolsVersion "22.0.1"
  
      defaultConfig {
          applicationId "com.myapp"
          minSdkVersion 15
          targetSdkVersion 22
      }
  }
  
  dependencies {
      compile(group: 'com.myapplib', name: 'myapplib', version: '1.0.3', ext: 'aar')    
  }
  </code></pre>
  
  <p>So main logic is inside library. Project just have some style changes. As I can see inside aar file there is R.txt file with all values and params from library and also there is line</p>
  
  <blockquote>
    <p>int integer google_play_services_version 0x7f080002</p>
  </blockquote>
  
  <p>but anyway everytime when I'm compiling project I'm getting error. How can I solve this?<br>
  One easiest and bad solution is to hardcode this value inside my library, but I think it's awful.  </p>
  
  <p>Another big question is why do I need to specify inside my manifest value from library, which uses only inside that library? Why just don't use it inside and leave developes without that problem</p>