Sketchware-Pro / Sketchware-Pro

Sketchware Pro's sources in Java. Now anyone can contribute to Sketchware Pro.
https://sketchware.pro
Other
863 stars 254 forks source link

Error in Exporting AAB file and App #498

Closed PrakharDoneria closed 1 year ago

PrakharDoneria commented 1 year ago

I made a keystore using APK Signer and was using Sketchware.Pro.v6.4.0-rc04-minApi26 version so that I can use Ad Mob, but got error at last Screenshot_20220711-194628 Also when I executed project normally (RUN button) my app crashes Screenshot_20220711-194844

Also ad shows Test Ad instead of Real Ads in application maybe that's a APK singing issue

JavkhlanK commented 1 year ago

First issue: Yeah, it's probably a restriction of the signing library Sketchware Pro uses. Not sure how to fix that, but as workaround, try exporting an unsigned APK or AAB, and then sign the output using a 3rd party tool like apk-signer from Google Play.

Second issue: Does your project use the YouTube Player View? If yes, that's also a known issue, which also don't fully understand why. When exported, things magically work again. It's weird.

Third: You have to export projects for them to use the real ad ID. That's because AdMob can and will suspend accounts when you as developer watch real ads using the production ad unit ID.

AdesonBezerra commented 1 year ago

I was using test version 01 and was compiling AAB, when I migrated to new version it was not compiling

AdesonBezerra commented 1 year ago

Screenshot_20220716-093251_Sketchware Pro Screenshot_20220716-093208_Sketchware Pro Screenshot_20220716-094344_Chrome

AdesonBezerra commented 1 year ago

it is generating the defective AAB

AdesonBezerra commented 1 year ago

I also verified that I succeed in exporting AAB without signing

Screenshot_20220716-103218_Sketchware Pro

JavkhlanK commented 1 year ago

Wow, okay. Thanks for reporting! I'd say Spongy Castle classes taken from Sketchware should be replaced with a Gradle dependency, that'd fix the issues that come from the dex2jar version I used to create .class/.jar files out of .dex files.

JavkhlanK commented 1 year ago

I'm not sure if we'll ever get signing with key stores made with tools other than Sketchware Pro to work though.

AdesonBezerra commented 1 year ago

if i create a signature key in Sketchware Pro can i get it? in the old version I was using a key that I created in apk-signer and it worked, I will try to create one in Sketchware Pro in this new version to see if it works

JavkhlanK commented 1 year ago

I advise you to export unsigned files and later sign them with a tool like apk-signer from Google Play, as I found out that key stores generated by and usable by Sketchware Pro currently are not "secure enough" for Google Play. (SHA1withRSA only, apparently, but SHA-1 hashing was sorta broken already)

ayyoubmoqine commented 1 year ago

✅✅

AdesonBezerra commented 1 year ago

What confuses me is that, in the test version rc01 it was working, I was able to sign, with the new versions no, this has nothing to do with PayStore.

I used to and now I can't because of the update.

I'm signing with version rc01 and sending it to PlayStore, it's working, I just can't send it when I update sketchware pro

JavkhlanK commented 1 year ago

That makes sense as Sketchware Pro was fully ported to Android Studio / Gradle + Android Gradle Plugin after v6.4.0-rc01. There seemingly still are a few issues though, as you can see here.

AdesonBezerra commented 1 year ago

I tried again and got it!

Always when I signed the rc01 version I put SHA512withRSA and it worked.

So I put SHA1withRSA in that rc04 version and got

JavkhlanK commented 1 year ago

This should have been fixed with commit 32828fe1892630aa3c9d2676d05ce928c0876640.

AdesonBezerra commented 1 year ago

Since it's compiling and signing I believe this problem has been resolved

JavkhlanK commented 1 year ago

Thanks for testing it out!

subhash16 commented 1 year ago

Since it's compiling and signing I believe this problem has been resolved

Then close this issue