0

I am working on a project and when I try to release a signed APK from build.Gradle it gives me this error :

Error:(20, 0) C:\Users\sephn\Downloads\Fingerprint2Sleep-master\signing.properties (The system cannot find the file specified) Open File

Here is my SigningConfigs:

signingConfigs {
        release {
            def File signingConfFile = file("../signing.properties")
            def Properties signingConf = new Properties()
            signingConf.load(new FileInputStream(signingConfFile))

            storeFile file(signingConf['C:\\Users\\sephn\\Downloads\\APKs & JKSs\\FingerPrintQuickie.jks'])
            storePassword signingConf['MyPassword']
            keyAlias signingConf['MyKey']
            keyPassword signingConf['MyPassword']
        }
    }
Gerhard
  • 22,678
  • 7
  • 27
  • 43
Grey Ish
  • 13
  • 3

1 Answers1

0

Try removing all uses of signingConfig and signingConfigs in your build.gradle file. And instead, consider using Android Studio -> Build -> Generate Signed APK, and enter your credentials manually.

Sometimes gradle-based signing scripts do not always work. See also: Android Studio 2.2 - Can no longer create unsigned release builds - "validateSigningReleaseLive FAILED"

Mr-IDE
  • 7,051
  • 1
  • 53
  • 59
  • don't know how to remove all uses of signingConfig and sigingConfigs in my build.gradle since I am new to android studio. I have tried to generate a signed APK using android studio and didn't work, all signature cases were greyed out. – Grey Ish Nov 27 '17 at 13:40
  • @GreyIsh comment out or delete all lines and blocks that define `signingConfigs` and `signingConfig` – Mr-IDE Nov 27 '17 at 13:43
  • I did what you have said but it still gives this error: Error:Execution failed for task ':app:processDebugGoogleServices'. > File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: C:\Users\sephn\Downloads\Fingerprint2Sleep-master\app\src\debug\google-services.json C:\Users\sephn\Downloads\Fingerprint2Sleep-master\app\google-services.json – Grey Ish Nov 27 '17 at 15:00
  • @GreyIsh Are you using Google Firebase or Analytics or AdMob in your app? You'll need to copy your `google-services.json` file into the `app` folder. Then ideally do a Gradle sync, then try to rebuild. See also: https://stackoverflow.com/questions/44318147 – Mr-IDE Nov 27 '17 at 16:09
  • yes I am using all of that. Ok thank you I'll try that – Grey Ish Nov 27 '17 at 22:38