0
votes

My first Android project is finish. I want to load Google Play. when I make build -> Generate Signed APK give error android studio.

For Gradle-based projects, the signing configuration should be specified in the Gradle build scripts.See the Gradle User Guide for more info."

I tried to sign configs as this sample

signingConfigs {
        release {
            storeFile file("mykeystore")
            storePassword "mypassword"  
            keyAlias "my alias"
            keyPassword "mykeypassword"
        }
    }
    buildTypes {
        release {
            signingConfig signingConfigs.release
        }
    } 

But I dont know mykeystore and my password and other infos.

release {
            storeFile file("mykeystore")  -> what is mykeystore ?
            storePassword "mypassword"    -> what is mypassword ?
            keyAlias "my alias"           -> what is myalias ?
            keyPassword "mykeypassword"      -> what is mykeypassword ?
        }

I cant build apk my project. This is my first project. I use android studio 2.0.11 and mac os x lion.

Please help. Sorry bad english. Thanks.

1
The graddle code you have is correct, to obtain a keystore file, password, alias and key password, follow the instructions in this guide to generate a keystore file. developer.android.com/tools/publishing/app-signing.html#certspeedynomads
Android Studio update 0.3.0 and my problem is fixedOlkunmustafa

1 Answers

-2
votes

Do this way.. The manual is clear enough. Please specify what part you get stuck with after you work trought it, I'd suggest:

http://developer.android.com/guide/publishing/app-signing.html

Ok, a small overview, without reference or eclipse around, so leave some space for errors, but it works like this

  • open your project in eclips
  • press right-mouse, tools (android tools?) - > export signed application (apk?)
  • go trough the wizzard:
  • make a new key-store. remember that password
  • sign your app
  • save it etc.

Also, from the link:

Compile and sign with Eclipse ADT

If you are using Eclipse with the ADT plugin, you can use the Export Wizard to export a signed .apk (and even create a new keystore, if necessary). The Export Wizard performs all the interaction with the Keytool and Jarsigner for you, which allows you to sign the package using a GUI instead of performing the manual procedures to compile, sign, and align, as discussed above. Once the wizard has compiled and signed your package, it will also perfom package alignment with zipalign. Because the Export Wizard uses both Keytool and Jarsigner, you should ensure that they are accessible on your computer, as described above in the Basic Setup for Signing.

To create a signed and aligned .apk in Eclipse:

  1. Select the project in the Package Explorer and select File > Export.
  2. Open the Android folder, select Export Android Application, and click Next.

    The Export Android Application wizard now starts, which will guide you through the process of signing your application, including steps for selecting the private key with which to sign the .apk (or creating a new keystore and private key).

  3. Complete the Export Wizard and your application will be compiled, signed, aligned, and ready for distribution.