Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package install error #684

Open
devkumar00001 opened this issue Dec 28, 2022 · 33 comments
Open

Package install error #684

devkumar00001 opened this issue Dec 28, 2022 · 33 comments
Labels
bug Something isn't working fixed A bug is fixed

Comments

@devkumar00001
Copy link
Contributor

I used to create app and sign it from sketchware but when v6.4.0rc-05 miniApi 26 my app is run good but it is not signing I am sketchware sign my apk but the apk is not installing.
In old version(v6.4.0rc-04 miniApi 26) the apk is installing with no problem please guide me to fix it or if it is a bug please try to fix it.

@devkumar00001
Copy link
Contributor Author

And due to this reason I can't able to ad my admob real data

@JavkhlanK
Copy link
Member

When exporting an APK, zipalign gets run to optimize the APK file. Somehow that currently ends up corrupting the signature though. To fix that, sign the .apk again with e.g. apk-signer.

@JavkhlanK JavkhlanK added the bug Something isn't working label Dec 28, 2022
@devkumar00001
Copy link
Contributor Author

When exporting an APK, zipalign gets run to optimize the APK file. Somehow that currently ends up corrupting the signature though. To fix that, sign the .apk again with e.g. apk-signer.

Can you give a advice in briefly how Can I currently fix the error currently because my app is live on Amazon app store and I have to update it with same signature

@JavkhlanK
Copy link
Member

To fix that, sign the .apk again with e.g. apk-signer.

@devkumar00001
Copy link
Contributor Author

devkumar00001 commented Dec 29, 2022

To fix that, sign the .apk again with e.g. apk-signer.

I already did it but Ii can't fix😣😣😣

@JavkhlanK
Copy link
Member

what?

@devkumar00001
Copy link
Contributor Author

what?

I have already tried it but it is not fixing

@devkumar00001
Copy link
Contributor Author

IMG_20221229_153134

@devkumar00001
Copy link
Contributor Author

This is my app : https://www.amazon.com/dp/B09PZVR7L7/ref=apps_sf_sta
I have published this app to take admob approval for ads and Admob approved my app to serve ads but when I entered my admob data to sketchware pro and then run it,It shows me test and then someone taught me you need to sign apk from sketchware to show real ads.So I did same,But sketchware-pro is not correctly signing my apk my device show There was a problem while parsing the package
I tried apk-signer as you(JavkhlanK ) suggested me but apk-signer is also crashed #684 (comment).
Please suggest me another way to fix it as I have no option now to add admob real ads

@JavkhlanK
Copy link
Member

Did you turn on aligning in apk-signer? If yes, try turning that off.

@devkumar00001
Copy link
Contributor Author

Did you turn on aligning in apk-signer? If yes, try turning that off.

I tried both but did not working.

@devkumar00001
Copy link
Contributor Author

@JavkhlanK I found a way to fix admob problem I replaced test id's to my real id's using XML and Java command block.

@JavkhlanK
Copy link
Member

Don't publish .apk files generated by the Run button. They should only be used for testing.

@devkumar00001
Copy link
Contributor Author

Don't publish .apk files generated by the Run button. They should only be used for testing.

Thanks for your information but why?

@JavkhlanK
Copy link
Member

They contain debug code, like test ad IDs or the debug logcat logger. There might even be more, but those .apk files just aren't meant to be shared with others.

@devkumar00001
Copy link
Contributor Author

Ok but there is any hope to fix that?

@subhash16
Copy link

First you have edit the apk file with the help of apk editor ,just change anything like minimum SDK 20 then build the apk and sign the exported apk with apk signer it will work definitely.

@JavkhlanK
Copy link
Member

Ok but there is any hope to fix that?

Seems like an issue in apk-signer, I don't know. Maybe try using MT Manager instead.

@JavkhlanK
Copy link
Member

First you have edit the apk file with the help of apk editor ,just change anything like minimum SDK 20 then build the apk and sign the exported apk with apk signer it will work definitely.

That won't work. The app would still be using test ad IDs, no matter if it was signed or not.

@subhash16
Copy link

First you have edit the apk file with the help of apk editor ,just change anything like minimum SDK 20 then build the apk and sign the exported apk with apk signer it will work definitely.

That won't work. The app would still be using test ad IDs, no matter if it was signed or not.

Bro just Export sign apk then edit with apk editor then sign with apk singer it will definitely work.I tested

@devkumar00001
Copy link
Contributor Author

First you have edit the apk file with the help of apk editor ,just change anything like minimum SDK 20 then build the apk and sign the exported apk with apk signer it will work definitely.

That won't work. The app would still be using test ad IDs, no matter if it was signed or not.

Bro just Export sign apk then edit with apk editor then sign with apk singer it will definitely work.I tested

Not working bro

@STICKnoLOGIC
Copy link

Caution: If you sign your APK using apksigner and make further changes to the APK, the APK's signature is invalidated. If you use zipalign to align your APK, use it before signing the APK.
src:https://developer.android.com/studio/command-line/apksigner

it already said what is the problem here, if I sign the project, it sign first before the zipalign, kindly see the execution process in java code (I cant find the java files for the execution order so I cant a pull a request)

@JavkhlanK
Copy link
Member

That only applies when using apksigner, which isn't being used when exporting a signed APK or AAB. Sketchware Pro uses kellinwood's zipsigner instead, which should work like jarsigner, so it also aligns the file after signing just like that docs page tells to do.

That apparently doesn't work though! 😩

@devkumar00001
Copy link
Contributor Author

That only applies when using apksigner, which isn't being used when exporting a signed APK or AAB. Sketchware Pro uses kellinwood's zipsigner instead, which should work like jarsigner, so it also aligns the file after signing just like that docs page tells to do.

That apparently doesn't work though! 😩

😥

@JavkhlanK
Copy link
Member

I think I've finally fixed this. Get the latest snapshot build as always if you'd like to test that out.

@JavkhlanK JavkhlanK added the fixed A bug is fixed label Jan 29, 2023
@devkumar00001
Copy link
Contributor Author

I think I've finally fixed this. Get the latest snapshot build as always if you'd like to test that out.

Oh! Thanks a lot ❤

@devkumar00001
Copy link
Contributor Author

I think I've finally fixed this. Get the latest snapshot build as always if you'd like to test that out.

Can I close this issue?

@STICKnoLOGIC
Copy link

Caution: If you sign your APK using apksigner and make further changes to the APK, the APK's signature is invalidated. If you use zipalign to align your APK, use it before signing the APK. src:https://developer.android.com/studio/command-line/apksigner

it already said what is the problem here, if I sign the project, it sign first before the zipalign, kindly see the execution process in java code (I cant find the java files for the execution order so I cant a pull a request)

can I pull a request about this? I fixed it using this method, although I also fix the installation blocked by playstore, although it needs some testing before I pull a request for both this

@JavkhlanK
Copy link
Member

I think I've finally fixed this. Get the latest snapshot build as always if you'd like to test that out.

Can I close this issue?

Don't, let's keep this open until v6.4.0-rc06 is released.

@JavkhlanK
Copy link
Member

Caution: If you sign your APK using apksigner and make further changes to the APK, the APK's signature is invalidated. If you use zipalign to align your APK, use it before signing the APK. src:https://developer.android.com/studio/command-line/apksigner

it already said what is the problem here, if I sign the project, it sign first before the zipalign, kindly see the execution process in java code (I cant find the java files for the execution order so I cant a pull a request)

can I pull a request about this? I fixed it using this method, although I also fix the installation blocked by playstore, although it needs some testing before I pull a request for both this

I already did that with commit c5b3f09, even though the app doesn't use apksigner in some cases.

@subhash16
Copy link

I think I've finally fixed this. Get the latest snapshot build as always if you'd like to test that out.

Can I close this issue?

Don't, let's keep this open until v6.4.0-rc06 is released.

When will release

@devkumar00001
Copy link
Contributor Author

I think I've finally fixed this. Get the latest snapshot build as always if you'd like to test that out.

Can I close this issue?

Don't, let's keep this open until v6.4.0-rc06 is released.

When will release

I am waiting for a long time😥

@JavkhlanK
Copy link
Member

I think I've finally fixed this. Get the latest snapshot build as always if you'd like to test that out.

Can I close this issue?

Don't, let's keep this open until v6.4.0-rc06 is released.

When will release

When it's ready. It just isn't possible to estimate when exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed A bug is fixed
Projects
None yet
Development

No branches or pull requests

4 participants