Various technical articles, IT-related tutorials, software information, and development journals
Wednesday, October 9, 2019
Android Studio incorrectly reformats Kotlin buildscripts
In the assignment they're currently working on, I saw some students create an activity in Android Studio and then receive script compilation errors in the project. The starter code we gave them contains a Kotlin DSL Gradle script which was altered by Android Studio when the activity was added. Strangely, the exclamation mark in !in was moved before the preceding space, making it invalid Kotlin. Reverting that change and doing a Gradle sync fixed the problem.
Thursday, October 3, 2019
"Unknown fragments" errors in the Android UI designer are normal
A student was poking around Android Studio today and asked about an "unknown fragments" error in the UI designer. This seems to be normal when including a fragment which has no layout to use as a preview, like the Google Maps SDK map fragment. Such fragments will appear as a dark gray box in the UI designer, but can work perfectly fine at runtime.
Monday, September 30, 2019
Android Chrome may not redirect to custom URI schemes automatically
Single Sign-On authentication for the Moodle mobile app works by opening the SSO page in a browser window and trusting the browser to redirect after the login to a custom URI scheme handled by the app. Interestingly, this works when the user was already logged into Moodle in their browser, but not after completing the SSO flow. Apparently the Chrome browser sometimes won't honor an HTTP Location redirect to a custom URI scheme. In Moodle's case, the confirmed=true query parameter can be added to make the page display some nice UI with a link to proceed to the app.
Sunday, September 29, 2019
Poking at the Markeen-assisted levels project
Many months ago, I started a Keen 5 level pack based on maps randomly generated by Markeen. It was coming along well but I left it alone for a long time because of other commitments. I had a couple moments of free time this week to look back at it. I had done my first pass of cleanup on the eighth map, but hadn't decided the flow of play through it. The constraints given to me by Markeen seem to require it to be an easier level than most others, but that's probably OK.
Wednesday, September 18, 2019
When Windows 10 upgrades to Enterprise instead of Pro
One user was trying to upgrade Windows 10 Home to Pro and so purchased a Pro upgrade in the Microsoft Store app. But after the installation, the Enterprise edition was installed and not activated because the user didn't have an Enterprise license. A clean reinstall of Windows 10 Home with another attempt at installing the Pro license from the Store produced Enterprise again. Apparently the way to downgrade to Pro is to use "change product key" to set the generic activation key for Pro. It will then notice the digital license and activate Pro properly.
Monday, September 16, 2019
CloudFront default objects are configured separately from S3 index documents
I recently helped someone set up a static site hosted on Amazon S3 with Amazon CloudFront as an SSL terminator. S3 buckets have an option for the index document (the page served when someone visits the root of the website). We set that, but found that going to the site's root produced an Access Denied error page, but going directly to a specific page worked. The CloudFront distribution apparently has a setting for default object which we had not set; CloudFront doesn't consult the S3 index document setting.
Saturday, September 14, 2019
Endless Gradle sync can indicate a missing Android SDK version
I previously noticed that if the Android SDK version requested by an Android Studio Gradle project isn't installed, Gradle sync may appear to succeed but everything will be broken. Today I found that another possible symptom is Gradle sync never finishing. A bunch of green check marks appear in the Build window, but a wheel still spins and Android Studio never proceeds to indexing. This can be fixed by installing the needed SDK version in the SDK Manager and pressing the Sync Project with Gradle Files button.
Subscribe to:
Posts (Atom)