2014-04-01 7 views
37

मैं अपने आवेदन को this link पर हस्ताक्षर करने का प्रयास करता हूं। मैं अपना हस्ताक्षर कॉन्फ़िगर सेटिंग्स लिखता हूं लेकिन मुझे "संपत्ति नहीं मिल सका" त्रुटि मिलती है।एंड्रॉइड ग्रेडिंग साइनिंग कॉन्फ़िगर त्रुटि

यह मेरा build.gradle

apply plugin: 'android' 

    android { 
     compileSdkVersion 19 
     buildToolsVersion '19.0.3' 
     defaultConfig { 
      minSdkVersion 11 
      targetSdkVersion 19 
      versionCode 1 
      versionName "Andy Warhol" 
     } 
     buildTypes { 
      debug { 
       proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
       debuggable false 
       jniDebugBuild false 
       signingConfig signingConfigs.myconfig 
      } 
      release { 
       proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
       debuggable false 
       jniDebugBuild false 
      } 
     } 
     signingConfigs { 
      myconfig { 
       keyAlias 'xxx' 
       keyPassword 'xxx' 
       storeFile file('xxx') 
       storePassword 'xxx' 
      } 
     } 
    } 

    dependencies { 
     compile 'com.android.support:appcompat-v7:+' 
     compile 'com.google.android.gms:play-services:4.0.30' 
     compile fileTree(dir: 'libs', include: ['*.jar']) 
     compile files('libs/picasso-2.2.0.jar') 
     compile files('libs/acra-4.5.0.jar') 
     compile files('libs/libGoogleAnalyticsServices.jar') 
    } 

यह मेरी त्रुटि है

Gradle 'BulentTirasMobileApp' परियोजना ताज़ा विफल रहा: संपत्ति SigningConfig कंटेनर पर 'myconfig' नहीं मिल सका।

उत्तर

109

अपने buildTypes ब्लॉक से पहले प्रकट करने के लिए अपने signingConfigs ब्लॉक ले जाएँ:

signingConfigs { 
     myconfig { 
      keyAlias 'xxx' 
      keyPassword 'xxx' 
      storeFile file('xxx') 
      storePassword 'xxx' 
     } 
    } 
    buildTypes { 
     debug { 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
      debuggable false 
      jniDebugBuild false 
      signingConfig signingConfigs.myconfig 
     } 
     release { 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
      debuggable false 
      jniDebugBuild false 
     } 
    } 

से पहले आपको यह उपयोग कर सकते हैं विन्यास को परिभाषित करने की जरूरत है।

संबंधित मुद्दे