【问题标题】:How to change location permission dialog name?如何更改位置权限对话框名称?
【发布时间】:2021-11-22 16:02:32
【问题描述】:

我有一个天气应用程序,几乎完成了。但我想在安装到谷歌游戏商店之前改变一些东西。在我的应用程序中访问用户的位置 当我第一次创建我的应用程序时,我用土耳其语名称创建了它,但我用英语编写了我的应用程序。我想要权限对话框名称,例如天气应用程序或英文名称,而不是土耳其语。我该如何解决这个问题。

[![在此处输入图片描述][1]][1]

屏幕截图 [1]:https://i.stack.imgur.com/7BF7Z.png

我的清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.enestigli.WeatherAPP">

<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:networkSecurityConfig="@xml/network_security_config"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/Theme.HavaDurumuProjesi2"
    android:usesCleartextTraffic="true">
    <activity android:name=".RecyclerView.cities" />
    <activity android:name=".Forecast.forecast" />
    <activity android:name=".AddCity.addcity" />
    <activity
        android:label="@string/app_name"
        android:name=".Main.MainActivity"
        android:screenOrientation="portrait">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

ma​​ifest 文件中的app_name

<resources>
   <string name="app_name">Weather App</string>
   <!-- TODO: Remove or change this placeholder text -->
   <string name="hello_blank_fragment">Hello blank fragment</string>
</resources>

【问题讨论】:

    标签: java android-studio label


    【解决方案1】:

    尝试在应用程序标签中添加 android:label="@string/app_name"

    编辑 - 已在用户的应用程序标记中回复 cmets 中的线程

    【讨论】:

    • 我已经试过了。你没看到。在我的清单文件中,伙计。
    • APP__NAME 打的是英文名字?
    • dude :D 你可以在 maifest 文件中看到 app_name。 app_name 是天气应用程序。抬头。我怎么能改变这一点。据我了解,更改标签名称只会更改操作栏中的名称,但我想更改权限对话框名称。你明白我的意思吗?
    • 我知道,但代码中没有其他土耳其名称?
    • 我修复了这个错误。我在设置gradle中更改了名称。设置 gradle -> 根名称
    【解决方案2】:

    我按照以下步骤解决了我的问题

    • 项目 -> Android -> Gradle 脚本 -> settings.gradle -> rootProject.name

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-05-10
      • 1970-01-01
      • 1970-01-01
      • 2012-09-15
      • 2011-03-24
      • 2021-03-09
      • 2011-12-19
      • 1970-01-01
      相关资源
      最近更新 更多