Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android KeytoolException: Failed to read key AndroidDebugKey lengthTag=109, too big

I've been trying to generate an .apk (debug or release) and I've been getting this error:

com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/home/note-300/.android/debug.keystore": DerInputStream.getLength(): lengthTag=109, too big.

I already tried creating a new key (with key and alias with the same name) on Android Studio, I deleted the .android/debug.keystore and run the following commands (from here):

keytool -importkeystore -srckeystore old.keystore -destkeystore new.keystore -deststoretype pkcs12

and

 keytool -importkeystore -srckeystore new.keystore -srcstoretype pkcs12 -destkeystore final.keystore -deststoretype jks

What else can I do to run my app?

OS: Ubuntu 18.04

Android Studio 3.3.1

like image 254
yasin Avatar asked Feb 14 '19 18:02

yasin


1 Answers

Try upgrading gradle from in the gradle-wrapper.properites file from 4.10.1 to 4.10.2. I had the same problem, and that fixed it for me.

like image 118
mtthws Avatar answered Oct 10 '22 05:10

mtthws