-
-
Notifications
You must be signed in to change notification settings - Fork 2
Rename app namespace in examples #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a namespace inconsistency issue in the Android example app that was causing runtime crashes due to mismatched package names. The app was unable to find the MainActivity class because the package declaration didn't match the namespace configuration.
- Standardizes package naming from
com.example.example
tocom.thorvg.example
- Updates both the Kotlin source file package declaration and Gradle namespace configurations
- Aligns the example app with the main Android module's naming convention
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
example/android/app/src/main/kotlin/com/thorvg/example/MainActivity.kt | Updates package declaration to match the namespace |
android/build.gradle | Updates group and namespace configurations to use consistent naming |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
In the general way of namespace, using domain in reversed order is recommended.
Let's arrange with organization's official domain style (thorvg.org)
example/android/app/src/main/kotlin/com/thorvg/example/MainActivity.kt
Outdated
Show resolved
Hide resolved
Thanks for review! I've added commit to fix namespace as "org.thorvg.example". |
@TaeBbong Please squash the commit. No reason to have 2 commits for single change |
a2a166d
to
fc8ef0d
Compare
Thanks for the review! I’ve squashed the commits into one as suggested. Please let me know if anything else needs adjustment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also check example/ios/Runner.xcodeproj/project.pbxproj
for bundleId
I've added a commit to update As you know, iOS has only one Just wondering, is there a particular reason |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments for changes in iOS/Runner.xcodeproj.
PRODUCT_BUNDLE_IDENTIFIER = com.example.lottieNative; | ||
PRODUCT_BUNDLE_IDENTIFIER = org.thorvg.example; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Target Runner
, Env Profile
.
PRODUCT_BUNDLE_IDENTIFIER = com.example.thorvg.RunnerTests; | ||
PRODUCT_BUNDLE_IDENTIFIER = org.thorvg.example.RunnerTests; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Target RunnerTests
, Env Debug
.
@TaeBbong No. |
baea91c
to
2a3c69a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Please squash the commits
2a3c69a
to
57fd303
Compare
Squash done and ready now:) |
Problem
By running android example app, I've got following error;
Cause of this error was inconsistent app namespace and package name for overall app.
For example, package name in
MainActivity.kt
wascom.example.example
,whereas namespace in
build.gradle.kts
wascom.thorvg.thorvg_example
.Android app finds app package by namespace defined in
android/app/build.gradle.kts
, so we need to keep consistency for overall app.Changes
com.thorvg.example
.