Framework guides

Native Configuration

1 min read

When using Capacitor with Lunadeck, you may need to customize the native Android project configuration for permissions, themes, or SDK versions.

AndroidManifest.xml

Lunadeck preserves your custom AndroidManifest.xml settings. Common modifications include:

<manifest>
  <!-- Permissions -->
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.INTERNET" />
 
  <application
    android:allowBackup="true"
    android:usesCleartextTraffic="true">
    <!-- Activities, services, receivers -->
  </application>
</manifest>

Gradle configuration

You can customize android/app/build.gradle to set SDK versions and dependencies:

android {
    compileSdkVersion 34
    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 34
        versionCode 1
        versionName "1.0.0"
    }
}

Resources and themes

Custom themes, colors, and drawable resources in android/app/src/main/res/ are included in the build. Common customizations:

  • Splash screenres/drawable/splash.xml
  • App iconres/mipmap-*/ic_launcher.png
  • Colorsres/values/colors.xml
  • Themesres/values/styles.xml

ProGuard rules

If your app uses ProGuard for code minification, include your rules in android/app/proguard-rules.pro. Lunadeck applies these rules during the release build.

Google Services

For Firebase or Google Maps integration, place your google-services.json file in android/app/. Lunadeck will detect and include it in the build automatically.