Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Signed APK file not working while debug APK works

So I just finally finished my first app and wanted to put it in the google store and for an unknown reason it always says "You must import a valid .apk file.".

I really don't know what I'm doing, I looked everywhere and kinda understood that i had to build a signed APK, which I did multiple times and none of them works.

Plus, important detail I just noticed: The signed apk doesn't work while the debug apk works with my phone?

And when I build a signed apk it says this as an error in the Gradle Console :

"Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\Lois\AndroidStudioProjects\iobner\app\src\main\java\com\lf\gt\knowy\suggestions.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details."

Can anyone help me? What do I have to do to make a working signed APK? And why does it not work while the debug works?! I have no experiences in this and learnt by myself to do the whole app but can't seem to find the problem by myself this time... Thank you!

like image 834
Louis Bouchard Avatar asked Nov 17 '17 03:11

Louis Bouchard


1 Answers

If you want to debug your release apk , add debuggable option in your manifest or gradle.

If you want to modify your AndroidManifest.xml

 <application
            android:debuggable="true"
            android:name=".YourApplication"
            android:allowBackup="true"
            android:icon="@mipmap/your_icon"
            android:label="@string/app_name"
            android:theme="@style/AppTheme"/>

Update

Signing APK Guide:

https://developer.android.com/studio/publish/app-signing.html

like image 84
diegoveloper Avatar answered Oct 03 '22 19:10

diegoveloper