Skip to main content
GuidesAPI ReferenceExamplesFAQ

Integrate the SDK

|

Step 1: Add the package

Add magiclane_maps_flutter to your pubspec.yaml:

dependencies:
flutter:
sdk: flutter
magiclane_maps_flutter:

Then install it:

flutter pub get

Step 2: Configure your platform

Verify Android SDK

Ensure ANDROID_SDK_ROOT environment variable is set to your Android SDK path.

Add Maven repository

In android/build.gradle.kts, add this inside the allprojects block:

allprojects {
repositories {
google()
mavenCentral()
maven {
url = uri("https://developer.magiclane.com/packages/android")
}
}
}

Disable code shrinking (release builds only)

In android/app/build.gradle.kts, add these lines to the release block:

buildTypes {
release {
signingConfig = signingConfigs.getByName("debug")
isMinifyEnabled = false
isShrinkResources = false
}
}

Troubleshooting

Dependencies not installing?

Try reinstalling:

flutter clean
flutter pub get

Check for issues:

flutter doctor
Android build failing?
  1. Open the android folder in Android Studio
  2. Let Gradle sync
  3. Fix any errors shown in the Build panel
Still having issues?

Clear the package cache and reinstall:

flutter pub cache clean
flutter pub get
iOS app crashes on startup (release mode only)?

Check that ios/Runner/Info.plist contains:

<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>

This entry is required for the SDK. Flutter projects include it by default.