Skip to content

Create a Package

Lumiq Creative edited this page May 2, 2020 · 2 revisions

The package name is an internal namespace for your code like com.example.app. This is used to resolve relative class names, among other things. It isn’t shown to users.

Add a Package

Right-click on /app/src/main/kotlin and select NewPackage. Name and create your package:

  • Segments are separated with full stops.
  • In segments, only alphanumeric characters and underscores are allowed.

Segments are translated to directories, so com.example.app becomes .../com/example/app in the file tree.

Move Files to the Package

Expand /app/src/main/kotlin/dev/jahir/blueprint/app (that’s dev.jahir.blueprint.app—the default package) and cut all four files located inside. Paste these in your package and delete the default package directory.

Connect the Package

/app/src/main/AndroidManifest.xml contains a package attribute:

package="dev.jahir.blueprint.app">

Edit this so it matches your package name.

Clone this wiki locally