Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import key store from eclipse to android studio

I made research on the topic, but couldn't find a solution:

I created a signed apk from an eclipse project, and i also have the eclipse key store. But i couldn"t find out how to import this key store at signing in Android Studio. These are the following things i already tried:

-adding the key store path as it was created originally by eclipse in Android Studio

-adding the path in Android Studio after adding the .jks extension to the original file

In both cases the error is:

Execution failed for task ':application:packageRelease'.

Failed to read key from keystore

So what is the correct way of adding an eclipse keystore to Android Studio?

Any suggestions appreciated, because i have no idea what goes wrong.

like image 302
AndroidCuriosity Avatar asked Jan 23 '15 21:01

AndroidCuriosity


People also ask

Where is the keystore path in Android Studio?

After clicking on the app, Navigate to Tasks. Inside Tasks, navigate to “android” and double click on the signing report option. After clicking on this option you will get to see the path for your debug. keystore file.

Can Android use same keystore?

So yes, you can use the same keystore to sign multiple apks, without a problem. You can also use the same alias (each alias is a certificate) to sign multiple apks, and it will work. It has security implications, however.

How do I import a module from Eclipse to Android?

Import as a module: Start Android Studio and open the project you’d like to add the module to. From the Android Studio menu click File > New > Import Module. Select the Eclipse ADT project folder with the AndroidManifest.xml file and click Ok. Modify the module name if desired, and click Next.

How do I import Eclipse ADT files into Android Studio?

From the Android Studio menu click File > New > Import Module. Select the Eclipse ADT project folder with the AndroidManifest.xml file and click Ok. Modify the module name if desired, and click Next. The import process prompts you to migrate any library and project dependencies to Android Studio,...

How do I import a project into Android Studio?

From the Android Studio menu click File > New > Import Project. Alternatively, from the Welcome screen, click Import project (Eclipse ADT, Gradle, etc.). Select the Eclipse ADT project folder with the AndroidManifest.xml file and click Ok. Select the destination folder and click Next.

Why does Android Studio’s importer change my Eclipse project?

When you use Android Studio’s importer, it automatically makes some changes to your Eclipse project, which are designed to get your project up and running in its new IDE.


2 Answers

I believe this message means that your key alias does not exist. In Android Studio, you can use Build > Generate Signed APK..., enter your key store password, and then browse for a list of key alias in the keystore.

like image 101
tachyonflux Avatar answered Nov 15 '22 14:11

tachyonflux


I had the same problem and was really frustrated with it. I have solved it and can help you with it.

1) Ensure that your key is uncorrupted and untampered. This is the reason behind most of the problems.

2) Select the path of the key in "Generate Signed APK" dialog box. This path can be anything, it doesn't actually matter.

3) Now just put your keystore password. This needs to be correct, otherwise you will get messages like "Keystore is corrupted", but it isn't.

4) After entering the password, select the Key Alias. If you enter wrong password, this field will be blank.

5) Put the Key Password same as Keystore password. This worked perfectly for me.

Hope it helps all of you. Thanks.

like image 34
Aritra Roy Avatar answered Nov 15 '22 12:11

Aritra Roy