Hangar (3.0?) for Android -- rewritten in Kotlin and Flutter Currently a WIP rebuild of the original Hangar
- Ability to change the 'switch page' icon
- App shortcuts/Stats widgets
The motivation behind this rewrite is explained in this youtube video!
There are a few glitches and gotchas that seem to happen (currently) when your Android app has a Flutter module.
- Set the
sdk.dir
andflutter.sdk
variables inapp/settings/.android/local.properties
to reflect where you have the Android SDKs and flutter SDK installed respectively. - Due to this issue, Flutter modules do not use AndroidX by default. However, the Flutter module in Hangar has been updated manually to use AndroidX. Anytime
flutter packages
(or possibly other flutter related commands) are run, Flutter overwritesapp/settings/.android/
files with pre-AndroidX copies. Run the scriptrestore_androidx.sh
inapp/settings/
before committing changes to reset back to the working AndroidX versions. - If you wish to use Flutter hot reload, run
flutter attach
inapp/settings
before running a debug build. - Dart support seems to randomly switch off in Android Studio. Enable to fix.
- Occasionally the
io.flutter.plugins.GeneratedPluginRegistrant
import inMainActivity
will fail to be found by Android Studio. Gradle sync will look like it's succeeding but you'll see the pinned message that it has failed. Restarting Android Studio seems to fix this. - Don't forget about note #2. If you notice things are being weird it may be due to Flutter overwriting AndroidX files in
app/settings/.android/
. Do a git diff and see if that's the case!