2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

ElixrDesktopのAndroidでpackage名の変更方法

2
Posted at

困ったこと

AndroidのPackage名を変更したい

- package io.elixirdesktop.example
+ package com.kitune330.app

対応

1. *.ktの移動
任意のpackageにBridge.ktとMainActivity.ktを移動する。
(この時、activity_main.xmlとの整合性が合わなくてエラーになる時があるが、gradle.buildをsyncしなおしたり等をして、頑張って整合性を合わせる)

2. native-lib.cppの修正
「cpp/native-lib.cpp」のL160あたりにある下記を変更したpackage名に合わせる

- Java_io_elixirdesktop_example_Bridge_startErlang(
+ Java_com_kitune330_app_Bridge_startErlang(

3. build.gradleの修正
「app/build.gradle」のapplicationIdをpackage名に合わせる

defaultConfig {
-    applicationId 'io.elixirdesktop.example'
+    applicationId 'com.kitune330.app'

4. AndroidManifest.xmlの修正
4-1. L3あたりにあるpackageをpackage名に合わせる

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="io.elixirdesktop.example"
+    package="com.kitune330.app"

4-2. L20あたりのandroid:authorities

-    android:authorities="io.elixirdesktop.example.fileprovider"
+    android:authorities="com.kitune330.app.fileprovider"

4-3. L30あたりのandroid:name も同時に変更する

-    android:name="io.elixirdesktop.example.MainActivity">
+    android:name="com.kitune330.app.MainActivity">

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?