Ttemplate project for Android app development, but apps built from this template will be very light-weight!
  • Shell 63.3%
  • Kotlin 36.7%
Find a file Use this template
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-26 03:17:46 +09:00
app Added support for softinputmode=adjustresize 2026-06-26 03:17:46 +09:00
gradle First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00
.gitignore First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00
build.gradle First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00
gradle.properties First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00
gradlew First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00
gradlew.bat First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00
README.MD Added support for softinputmode=adjustresize 2026-06-26 03:17:46 +09:00
settings.gradle First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00
setup.sh First commit. Targets Android API Level 37 (Android 17) 2026-06-25 19:44:44 +09:00

LightweightAndroidAppTemplate

All Android apps must be light-weight

About

This is a template project for Android app development.
But... apps built from this template will be very light-weight!

In the best case, the size of the APK after the build will be 1 in 42.

Not only that, but the minimum API level has been lowered to 14, so the app can run on almost any device.

All the needless bloat has been removed—JUnit which no one uses, the flashy yet heavylooking and slow MaterialYou, AppCompatActivity that has become heavier without any change, the fooyjayresolver thats the enemy of FDroid, and all the other unnecessary extras.

As a result, the app is not only lighter, but also looks cleaner and simpler, making it easier to create a userfriendly experience.

What are changed from default project

  • Removed JUnit tests.
  • Parent of activity class was changed to Activity() from AppCompatActivity().
    • Removed unnecessary codes: enableEdgeToEdge .
    • Removed unused imports.
  • Toplevel element of activity layout was changed to LinerLayout from androidx.constraintlayout.widget.ConstraintLayout.
  • Parents of themes are changed to @android:style/Theme.DeviceDefault.Light from Theme.Material3.DayNight.NoActionBar.
  • Removed unused files or directories: keppRules, backup_rules.xml, data_extraction_rules.xml.
  • Removed dependences other than libs.androidx.activity from app/build.gradle and gradle/libs.versions.toml
  • Enabled minifyEnabled and shrinkResources in app/build.gradle
  • minSdkVersion was changed to 14 (Android 4.0)

How to start development with this template

To start development with this template, you have to change application ID and application name.

By default, the application ID is lightweight.androidapp.template and application name is LightweightAndroidAppTemplate.
You need to change the files that contain these names.
The files that need to be changed are as follows:

  • /settings.gradle
  • /app/src/main/AndroidManifest.xml
  • /app/build.gradle
  • /app/src/main/res/values/strings.xml
  • /app/src/main/res/values/themes.xml
  • /app/src/main/res/values-night/themes.xml
  • /app/src/main/java/lightweight/androidapp/template/MainActivity.kt

Also, you have to change the path of MainActivity.kt based on your application ID. For example, if your application ID is com.example.MyApp, the directory structure will be as follows:

/app/src/main/java/com/example/MyApp/MainActivity.kt

At last, DO NOT FORGET to remove .git directory!!
Be careful not to commit your project to this template repository!

It can be tedious to run these tasks every time you create a project.
Therefore, I have included a script that performs all of these changes in one go.
Navigate to the project's toplevel directory and run the following:

./setup.sh

Running this script will sequentially prompt you for an Application ID and an Application name.
Enter the ID and name you plan to use for your project—do not include any spaces.

Once you provide the ID and app name, the necessary files will be rewritten, and extraneous data such as this script, the README.MD, and the.gitdirectory will be cleaned up.

That completes the setup! You can now open the project into Android Studio, or manually edit the code and run gradlew to build it.