Я пытаюсь создать приложение камеры, которое делает фотографии и сохраняет их локально. Всякий раз, когда я добавляю провайдера в свой файл AndroidManifest.xml, я получаю сообщение «Ошибка запуска», говоря «Приложение сеанса»: установка не удалась. Установка не удалась »
Я пытался изменить android: exported = "false" на android: exported = "true". Это не сработало.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.eservis">
<uses-permission
android:name="android.permission.CAMERA" />
<uses-feature
android:name="android.hardware.Camera"
android:required="true" />
<uses-feature
android:name="android.hardware.camera.autofocus" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="EServis v2.0"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Design.Light.NoActionBar"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name=".OtvorenNalogActivity"
android:label="@string/title_activity_otvoren_nalog"
android:parentActivityName=".NaloziActivity"
android:theme="@style/Theme.Design.Light" />
<activity
android:name=".NaloziActivity"
android:label=""
android:parentActivityName=".MainActivity"
android:theme="@style/Theme.Design.Light">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:screenOrientation="portrait" />
<activity
android:name=".LogInActivity"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example.android.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_path" />
</provider>
<meta-data
android:name="android.app.searchable"
android:resource="@xml/searchable" />
</application>
</manifest>```
I expect to be able to save my photos to local storage.