9

I've signed an app with a sign which I've created. I've installed this apk in my phone and this is ok, but when I've tried to open the app crashes (doesn't show any activity), and it doesn't give me the posibility to watch the log (this dialog doesn't have the report button)

The problem is the sign which I've signed the app. I've tested with other sign and the app opens perfectly. I can't post any information about the creation of the sign, but only I can say I've used:

Letters and _ character in alias

Letters, numbers and - character in password

50 in years

and Letters in name

others field are blank.

The main problem is that the app is published in the google play, so How I can publish a new signed apk without to unpublish this app and create a new app?

beni
  • 3,019
  • 5
  • 35
  • 55
  • 1
    I had the same problem before, not sure why but when I sign my apk the app was crashing when open. Before signing the apk I was cleaning the project and sign it after that. That was fixed my problem. – hardartcore Feb 02 '13 at 12:10
  • Thanks for the answer but yesterday I was mad solving this problem, and I did it an amount of times. – beni Feb 02 '13 at 12:14
  • Actually you need to be able to see the logs of your crash when your device is connected,but they won't be sorted.Try to see if you will be able to catch them. – hardartcore Feb 02 '13 at 12:22
  • I can't see anything. But, you have reason in your first answer. I've cleaned the project, and then I've exported the apk and gone. But I've tried it another time and the app crashes. So, the solution is clean the project and export it. I've sent the project to a friend and he doesn't have any problem to sign the app with this sign. – beni Feb 02 '13 at 13:39
  • do you have any libraries that you use in your app? – hardartcore Feb 02 '13 at 14:39
  • Yes, I have a lot of libraries in this project. But, my friend, in his computer, can sign the app perfectly, but on mine, doesn't. Only once can generate a good signed apk. – beni Feb 03 '13 at 11:03

8 Answers8

9

Cleaning the project solved the problem in my case.

Zakharov Roman
  • 739
  • 3
  • 13
  • 31
  • Clearing the gen folder may also be a requirement as the clean doesn't rewrite -all- information (when some may be corrupt). By clearing one may want to completely delete/remove the gen folder then do a new clean build. – Brandon Feb 23 '15 at 16:02
  • 1
    It work for me. Very small thing "just clean project". Thanks. – Vrajesh Dec 23 '15 at 12:51
8

For anyone getting this in a react-native environment, remember to bundle your js before generating the signed APK.

Easy to forget if you're using something like Android Studios GUI

Community
  • 1
  • 1
Brad Adams
  • 2,066
  • 4
  • 29
  • 38
6

Delete "gen" folder from the Project then Cleaning the project

Palak
  • 2,165
  • 2
  • 21
  • 31
  • This was definitely the correct solution for my case. I also created a new keystore.keystore file with updated details. I then deleted the GEN folder and cleaned the project (at the project specific folder). Once I did this, I exported the signed app with the new keystore file and it worked perfectly. Thank you for the hint at this issue. – Brandon Feb 23 '15 at 16:01
5

In my case, I had to change the minifyEnabled to false in build.gradle

buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } }

2

You can see this publish APK and its details like version code and version name and etc. in you developer account on google play

There is one button "Upload new APK"

  • Click on "Upload new APK" Button
  • Upload new sign APK with bug fixed
  • deactive current APK
  • Active new apk

Note : Don't change package name for new APK

Palak
  • 2,165
  • 2
  • 21
  • 31
0

Another possible cause (as was the case for me) is using the wrong JDK/JRE version when building your signed APK.

If you're using Eclipse, check Window -> Preferences -> Java -> Installed JREs and see which one is checked as the default. Android is not yet compatible with Java 8.

voxoid
  • 1,164
  • 1
  • 14
  • 31
0

I had the same problem today and for me it turned out the reason was:

I used void blaMethod() in my Java code which I tried to call by onClick methods of XML Buttons. I had to learn that these methods need to be public void ... - I usually do that, but this time I got a little sloppy.

The strange thing is: my unsigned APK worked perfectly fine on all my devices, but the signed one just crashed when using those methods (could not find method (view) in a parent or ancestor context). Don't get why that is... May this help someone!

Greets

Ben
  • 265
  • 3
  • 13
0

You can simply create a new keystore if you are in testing Or simply in my case retype the password

Aryan Tech
  • 13
  • 3