APK signertool issue -Java Runtime only recognizes class file versions of up to 52.0

NOTE TO SELF:

Signing packages failed. java.lang.UnsupportedClassVersionError: com/android/apksigner/ApkSignerTool has been compiled by a more recent version of Java Runtime(class file version 53.0), this version of the Java Runtime only recognizes class file versions of up to 52.0

https://stackoverflow.com/questions/60441090/apksignertool-issue-with-java-version

Confirmed Solution: . I solved it removing version 30.0.0 (rc2) of android build tools 

 

Að prófa Gigg.Live

Takk fyrir að skoða þennan póst – ætlaðan fyrir þá sem eru til í að hjálpa til við að prófa nýtt app sem ég (Geir) og Snillinn Jói (snilli.is) erum að setja í loftið.

Við erum að prófa BETA útgáfu af appinu – sem þýðir að það þarf eitt auka skref til að prófa.  Öll endurgjöf er ofboðslega vel þegin á þessum tímapunkti – annað hvort með því að senda okkur Jóa bara skilaboð á Facebook eða  í gegnum Twitter eða Facebook reikning Gigg.Live

Hvernig setur þú upp appið? … stutta útgáfan (video neðst)

Hvernig setur þú upp appið? …ítarlega útgáfan

Skref 1

Smelltu á eftirfarandi tengil: https://play.google.com/apps/testing/org.centersoftware.gigg.xmobile/join?hl=is-IS

Þá kemur eftirfarandi mynd upp – sem segir að þú sért að taka þátt í prófunum og appið sé ekki endilega fullklárað og þú gætir lent í smávillum í símanum.   Þú smellir á smellir á “Become a tester”, það tekur nokkrar mínutúr að virka eftir að þú smellir á hnappinn. Þannig að þú færð þér bara kaffi á meðan 🙂

Screenshot 2020-04-20 at 13.21.27

Skref 2

Opnaðu vefsíðuna https://gigg.live í símanum.   Þar er merki sem segir  “Get it on Google Play”  Smelltu á þann takka til að setja Gigg.Live upp í tölvunni.

Screenshot 2020-04-20 at 13.34.50

Skref 3

Þegar þú ferð svo yfir í Play Store – þá er bara eitt mikilvægt 🙂 … það er að þú sjáir að undir “What’s new” þá standi “Last updated 20 Apr 2020” (ekki 14. eða 15 apríl … þá krassar appið bara hjá þér.

Screenshot_20200420-134747_Google Play Store

Hvernig setur þú upp appið? … videoið

TechTalk Today – summary

Today on TechTalk we visited a disucssion on app stores (Play and AppStore), discussing the Google Key Storage and how it affects publishing into the PlayStore – also Covid delays in publishing in the PlayStore while AppStore is responsive as hell.  Geir introduced the 2 apps that were approved into the appstore on Monday, Golf80.com and Gigg.Live.  We looked a bit into the Xamarin code and discussed services and application architectures in Xamarin.  Slightly visited the videos from the Focus on Xamarin .Net conference which we covered last week.

HttpClient.PostAsync disappears and doesn’t return … ?

Found the following (from 2014!!) after banging my head against the wall for 3×4 hours …. in 2 projects.  This explains a lot and I am not sure that all developers are aware of this deadlock? Or am I the only one? 🙂 So back to work!!

https://forums.xamarin.com/discussion/17086/httpclient-postasync-doesnt-work-when-awaited

—— FORUM POST BEGINS ———

Ok, discovered the answer the hard way after 2 days of tracing and breakpointing. In a nutshell, you can’t call an asynchronous method

await asyncmethod2()

from a method that blocks

method1().Result

as it causes a deadlock to occur when method2 attempts to return execution to the caller.

—— FORUM POST ENDS ———

… and so, I decided to refresh my Task thinking with this excellent beginners guide to threading in c#. Good stuff.

https://www.pluralsight.com/guides/understand-control-flow-async-await

Android app publishing in the real world

I have my code in Bitbucket and have been using Microsoft’s AppCenter for analytics and error analysis on my Ios and Android Xamarin app (golf80.com).  Now I have connected bitbucket to AppCenter so I can manually trigger builds based on any commit (or automatically).  The problem is that the AppCenter doesn’t want to build my .aab (Android App Bundle) even thought my .apk works nicely – signing process and everything so I am left with old fashioned steps (note to self):

  1. Release build the .aab locally
  2. Sign using this command (without the -sigalg and -digestalg as the default seems to work for me): Screenshot 2020-02-08 at 15.31.29
  3. Upload the .aab to the PlayStore

Hoping that the AppCenter fixes this soon, I am not getting any clear error messages and Goggling hasn’t helped me much on this issue – so bypassing AppCenter for builds for now as time is of essence to get this in the hands golfers 🙂

Endless problems with Xamarin.Auth on Android

I would guess that in my last 4 weeks of creating the Golf80 app – about third of the time has been spent on 3rd party authentication (Google, Facebook, … ) and most of that time on Google authentication on Android.  A lot of lessons learned and googled.  Most of the examples are pretty thin, and explain the simple parts but leave out detailed explanation of the callback and url interception process.  My favorite explanation (note to self) is probably this one:  https://www.codementor.io/@ravitejalingineni/oauth-explained-with-xamarin-forms-q2zomkhda

 

Xamarin.Forms Attempt to read from field ‘int android.view.ViewGroup$LayoutParams.width’ on a null object reference

One of my forms started crashing after Xamarin.Forms update (I haven’t investigated which update broke this code)  Can you spot what’s wrong with this code (simplified)?

Screenshot 2020-01-30 at 09.37.19

This results in this following error box which was driving me crazy:

Screenshot 2020-01-30 at 09.33.23

Well, turns out that the “VerticalOptions=”End” is the code part that has been crashing the page all this time. I know this is not good coding (not to have some kind of layout on the ContentPage – but why does this crash? I don’t understand but note-to-self about this error message for the future.

smarterasp.net “no such user here” when sending mail with System.Net.Mail.Smtp

Funny error that took half a day trying to debug, the mail server always responded with “no such user here  <blu@blux.com>” when I was trying to send the email to the blux guy (somewhere out on the internet) from my personalgolfclub.com domain with a completely valid account and credentials.

Found this post: https://www.nopcommerce.com/boards/topic/40148/error-sending-e-mail-mailbox-unavailable-the-server-response-was-anotherdomaincom-no-such-user-here

So created a new user and used his credentials and everything works nicely …. sounds a bit like the old user’s password on the smtp gateway was somehow corrupt or the pw not up to date, anyways … devlife goes on 🙂