2
1

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 5 years have passed since last update.

開発した Android アプリに見知らぬ permission が増えていたときの削除法

Last updated at Posted at 2016-12-07

検索してなかなか出てこなかったので書きました。

Android アプリで知らないうちに permission が増えていたときの対処法です。

外部のライブラリを使うと、 AndroidManifest に記載していなくても、開発したアプリでは使わない権限が増えてしまうことがあります。
その場合の削除方法です(これを実行することで、予期せぬ不具合を起こす場合があるため、よく確認した上で実行してください)。

解決方法

例えば、 android.permission.INTERNET を削除したい場合は以下のように、不要でも一度 AndroidManifest.xml に書き

AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="hogehoge">

    <uses-permission
        android:name="android.permission.INTERNET"
        tools:node="remove"
    />

remove を付加することで削除することができます。

2
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?