Android Studio and Flutter: “this and base files have different roots”

If you encounter this error in Android Studio, and you have your source files in a different folder than the Flutter installation, you’ll have to move that Pub Cache folder to the same drive.

Move the folder located in C:\Users\<YOURNAME>\AppData\Local\Pub\Cache to the other drive. E.g. E:\src\Pub\Cache (or where ever you prefer)

Then set an Environment variable called PUB_CACHE to point to that new folder.

You might have to do a cache repair using:
flutter pub cache repair

Picked up a pair of Amigas

The result of opening a bottle of wine on a Friday evening and browsing to eBay… Unlike the A1200, these are relatively cheap. To my surprise they are both in excellent condition for being 30 years old. Both with unbroken warranty seals! That leaves me with second thoughts about modding them with the latest Kickstart ROMs and CF HDs

Unsupported class version number [52.0] (maximum 51.0, Java 1.7)

Xamarin Android Unsupported class version issues

When doing Xamarin Android development, you may have come across the error message after enabling MultiDex:

Error Can't read [C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v7.1\] 
(Can't process class [android/app/ActivityTracker.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))

This is most likely because of an older ProGuard installation.

Download the latest ProGuard from here (v5.3.3 as of this writing).

Determine the current Android SDK location that Xamarin is using by checking Tools->Options->Xamarin->Android Settings.

In my case it is C:\Users\Magnus\AppData\Local\Android\android-sdk.

So here is how to to so update the Proguard installation;

In the tools sub folder, rename the current proguard to proguard.old.

Extract the contents of the latest ProGuard zip file to a folder named proguard.

That should do it. Just remember that any changes in the SDK installation (using the Android SDK Manager) will put back the older version, so repeat this after an SDK update.

How to use JRE/JDK v8 with Android Studio v2

I was struggling with a rendering exception in Android Studio v2
Failed to load the LayoutLib: com/android/layoutlib/bridge/Bridge : Unsupported major.minor version 52.0

Apparently this can be fixed by telling Android Studio to use JRE v8 (for the IDE, not compiling).
One could edit the plist to tell Android Studio to use a different JRE than the default v6, but that’s not recommended by Google.

So here’s a workaround; create a shortcut/alias that exports a value to use JRE v8.

Save this to a .command file, for example LaunchAndroidStudio.command:
export STUDIO_JDK=/Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk
open /Applications/Android\

Change the icon for the alias.
Open the contents of /Applications/Android
Navigate to /Contents/Resources and double click the AndroidStudio.icns, it will open in Preview
Copy the icon (Command+C)
Open the LaunchAndroidStudio.command by the “Get Info” command.
Click the default icon in the top left corner and past the icon (Command+V)