在Android Studio的清单文件中询问多个权限时遇到问题

问题描述

下午好,

我最近一直在开发与计算机视觉和某种疾病的诊断有关的应用程序。自然,这要求我要求用户访问其相机和外部存储。另外,我需要询问其他功能(例如位置和手机)以获取该应用程序的其他功能。尽管没有构建时错误,但我不断收到此错误

W /活动:一次只能获得一组权限 I / art:已调用System.exit,状态:0

我在线上搜索了这个问题,发现了多个解决方案,告诉我创建一个包含所有请求的字符串数组,然后立即发送它们。但是,此解决方案要求我使用Java,问题在于我只在清单文件中请求许可,而在其他地方都没有,因此我对此感到困惑。是否可以仅使用清单文件解决此问题?

这是我当前正在使用的清单文件中的代码

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    // Name of app is here,has been removed
    <!-- Needed to use camera and store photos -->
    <uses-feature
        android:name="android.hardware.camera"
        android:required="true" />
    <uses-feature
        android:name="android.hardware.camera.any"
        android:required="true" />

    
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />

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

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        // Name of app is here,has been removed
        <activity android:name=".Classify"></activity>

        <uses-library android:name="com.google.android.maps" />
        
        <Meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <activity
            android:name=".ClinicMap"
            android:label="@string/title_activity_clinic_map" />
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

</manifest>

非常感谢您!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...