dailystudio / ml

ML related stuff
Apache License 2.0
140 stars 48 forks source link

Could not get unknown property 'RELEASE_STORE_FILE' #7

Open minjac opened 5 years ago

minjac commented 5 years ago

Hi, i build this project in Android Studio, and it gets some wrong: Could not get unknown property 'RELEASE_STORE_FILE' for SigningConfig_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=null, keyPassword=null, storeType=null, v1SigningEnabled=true, v2SigningEnabled=true} of type com.android.build.gradle.internal.dsl.SigningConfig. thanks !

dailystudio commented 5 years ago

You should declare the following items in gradle.properties (no matter in project or globally) : RELEASE_KEY_ALIAS= RELEASE_KEY_PASSWORD= If you use debug build, you may also need to declare the following items: DEBUG_KEY_PASSWORD=android DEBUG_STORE_PASSWORD=android DEBUG_KEY_ALIAS=androiddebugkey

Sean0123456789 commented 5 years ago

Hi @dailystudio, I'm still not sure how to define RELEASE_KEY_ALIAS,could you say more details? Many thanks!

Sean0123456789 commented 5 years ago

not clear with how to solve this issue, not define RELEASE_KEY_ALIAS, really sorry for the mistake

dailystudio commented 5 years ago

add the following two lines in gradle.properties under the root directory of your project: RELEASE_KEY_ALIAS= RELEASE_KEY_PASSWORD= This is the key alias of your keystore which is used to sign the apk.

ankitAMD commented 5 years ago

https://medium.com/@chauyan/how-to-use-properties-file-to-do-android-sign-action-in-gradle-45d51e31a98c

charlizesmith commented 5 years ago

I don't want to sign the apk. want to just run project. Can i run project without keys. How to remove this:

RELEASE_KEY_ALIAS= RELEASE_KEY_PASSWORD= If you use debug build, you may also need to declare the following items: DEBUG_KEY_PASSWORD=android DEBUG_STORE_PASSWORD=android DEBUG_KEY_ALIAS=androiddebugkey

charlizesmith commented 5 years ago

To run the cloned project - Open app level build.gradle file and comment the following code as mentioned here

/* signingConfigs {

    release {
        storeFile file(RELEASE_STORE_FILE)
        storePassword RELEASE_STORE_PASSWORD
        keyAlias RELEASE_KEY_ALIAS
        keyPassword RELEASE_KEY_PASSWORD
    }

    debug {
        storeFile file(DEBUG_STORE_FILE)
        storePassword DEBUG_STORE_PASSWORD
        keyAlias DEBUG_KEY_ALIAS
        keyPassword DEBUG_KEY_PASSWORD
    }

}*/

buildTypes {
    release {
        minifyEnabled true
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

// signingConfig signingConfigs.release

        buildConfigField "boolean","USE_STETHO","false"
    }

    debug {
        debuggable true

// signingConfig signingConfigs.debug versionNameSuffix " (DEBUG)"

        buildConfigField "boolean","USE_STETHO","true"
    }
}
wustzhy commented 1 year ago

We met this error, too. Finally we found that memberB's project lost file gradle.properties, which is ignored by file .gitignore. So memberA copy this file and send to memberB, then run ok. This usually happened when memberB pull code and run for the first time.