Difference between revisions of "Android"
m (→AdMobs) |
m (→AdMobs) |
||
Line 19: | Line 19: | ||
Admobs come with Google Play Services package. However, .jar file is not easy to find in revisions after 30. | Admobs come with Google Play Services package. However, .jar file is not easy to find in revisions after 30. | ||
− | The later revisions come with .aar files (specific to Google Android Studio?) under m2repository directory | + | The later revisions come with [https://developer.android.com/studio/projects/android-library.html#aar-contents .aar files] (specific to Google Android Studio?) under m2repository directory |
androidsdk\extras\google\m2repository\com\google\android\gms\play-services-ads | androidsdk\extras\google\m2repository\com\google\android\gms\play-services-ads |
Revision as of 08:09, 29 January 2017
Signing Apk
Whenever you're using a jarsigner, don't rely on its default setting to sign the apk properly. Check google Sign apk page and use the suggested settings by default.
My original script looked like this:
"%jdkbindir%\jarsigner" -verbose ^ -keystore bin\LCLDebugBKKey.keystore -keypass 123456 -storepass 123456 ^ -signedjar bin\%APP_NAME%-unaligned.apk bin\%APP_NAME%-unsigned.apk LCLDebugBKKey
It worked fine on my Android device, but failed on others. What I was missing (per Google's page) is "sigalg" and "digestalg" modifiers:
"%jdkbindir%\jarsigner" -verbose ^ -sigalg SHA1withRSA ^ -digestalg SHA1 ^ -keystore bin\LCLDebugBKKey.keystore -keypass 123456 -storepass 123456 ^ -signedjar bin\%APP_NAME%-unaligned.apk bin\%APP_NAME%-unsigned.apk LCLDebugBKKey
Debugging such issues could be tricky. Since the only thing that a user sees is a message "App Not Installed". A savvy person will not be able to give you log to see packager error. I had to use one of the online Android test services (testdroid) to get the log
AdMobs
Admobs come with Google Play Services package. However, .jar file is not easy to find in revisions after 30.
The later revisions come with .aar files (specific to Google Android Studio?) under m2repository directory
androidsdk\extras\google\m2repository\com\google\android\gms\play-services-ads
Why do we have to have so many build systems?!