Hey guys, how do you update your Uno installation? I updated my Android SDK to the latest and now I get a break in the export which I think is resolved with the latest version of uno: https://github.com/fuse-open/uno/blob/master/CHANGELOG.md
Ok, so this is what I have so far gang, y’all welcome to add your own experiences…
Note 1: Not for the feint of heart; use at own risk
Note 2: You won’t be able to compile for older android versions once you do this, so probably good to keep a separate machine for older builds with a fresh install.
- Backup your android sdk folder before you get started.
Mine was in/Users/<user folder>/Library/Android/sdk
- Download the Uno repo: https://github.com/fuse-open/uno
- Get all the prerequisites if ya don’t already have them. I specifically got Mono, Make, Node.js and NuGet (I also have VS but didn’t end up using it)
- Open terminal to the root of the uno repo
- Use
make release
- this will output a “release” folder - Copy the files in the
release/bin
folder to/Applications/Fuse.app/Contents/Uno
(Right-click show contents on the fuse app) - Copy the files in the
release/lib
folder to
/Users/<User folder>/Library/Application Support/Fusetools/Packages
- Update your Android SDK:
7.1. Goto Android SDK folder/Users/<User folder>/Library/Android/sdk/tools/bin
7.2. View what you currently have installed by executing./sdkmanager --list
7.3. Update SDK by executing./sdkmanager --update
- Copy back your NDK folder from your Android SDK backup
8.1. Copyndk-bundle
to your SDK folder - You should be good to go with building for Android 8.0 with the latest tools now (don’t forget to uno clean)
If your old NDK still isn’t working, then you could try download an older one and override it (Step 8): https://developer.android.com/ndk/downloads/revision_history
@Giako said he had success with r16b (thanks mate)
Oh, I used this setting in my .unoproj:
"Android": {
"SDK": {
"MinVersion": 26
}
}
Ps. My reason for note 2 (21 Sep 2018):
After much testing here are my findings:
Fresh install, had to replace NDK18 with NDK16b, can only build with latest tools as it statically uses latest Gradle(4.4), my results with settings used below: low Marshmallow(23) - Built + crash, a mid Marshmallow(23) - Built + run and a low Oreo(26) - Built + run
"SDK": {
"BuildToolsVersion": "27.0.3",
"CompileVersion": 27,
"MinVersion": 19,
"TargetVersion": 27
}
Oh yeah and Fuse.Maps/Android/MapView.uno in your fuselibs needs this:
[Require("Gradle.Repository", "maven { url 'https://maven.google.com' }")]