I try signing my Application like this link. I write my signingConfigs settings but I get "Could not find property" error.
This my 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') }
This is my error
Gradle 'BulentTirasMobileApp' project refresh failed: Could not find property 'myconfig' on SigningConfig container.
Move your signingConfigs
block to appear before your buildTypes
block:
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 } }
You need to define the configuration before you can use it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With