Renaming the package of a generated app is difficult
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Swift
- Stars
- 3.2k
- Forks
- 106
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 1
Description
If you want to change the package name of a Skip app from "hello.skip" to "hello.skipxyz", you need to perform the following 4 steps (see attached screenshot):
- Edit
Skip.envwith the change:ANDROID_PACKAGE_NAME = hello.skipxyz - Edit
Sources/HelloSkip/Skip/skip.ymland add the line underbuild:/contents::- 'group = "hello.skipxyz"' - Edit
Android/app/build.gradle.ktsand add the line in theandroidblock:group = "hello.skipxyz" - Edit
Android/src/main/kotlin/hello/skip/Main.ktand updatepackage hello.skipxyz, as well as importing the (auto-named and unchangeable) app module name:import hello.skip.*
Failure to do all of these will typically result in either a build error like:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
> Could not find hello.skip:HelloSkip:.
Required by:
project :app
or a crash on launch like:
01-25 11:31:31.511 27349 27349 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "hello.skipxyz.AndroidAppMain" on path: DexPathList[[zip file "/data/app/~~fw-W-ujTxVW3iNG3EXBXeA==/skip.hello.App-Z2ec3q7jlZqMiDzywvUcuw==/base.apk"],nativeLibraryDirectories=[/data/app/~~fw-W-ujTxVW3iNG3EXBXeA==/skip.hello.App-Z2ec3q7jlZqMiDzywvUcuw==/lib/arm64, /data/app/~~fw-W-ujTxVW3iNG3EXBXeA==/skip.hello.App-Z2ec3q7jlZqMiDzywvUcuw==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]
01-25 11:31:31.511 27349 27349 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)
01-25 11:31:31.511 27349 27349 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the package rename using Skip.env, Sources/HelloSkip/Skip/skip.yml, Android/app/build.gradle.kts, and Android/src/main/kotlin/hello/skip/Main.kt. Trace how these generated files derive the package and dependency names, then verify that changing the app package no longer causes the reported build failure or Android launch crash.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin, swift
- Domain
- build-system, mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100