前提・実現したいこと
現在、Android Studioでカメラ機能を使ったアプリを作りたいと思っています。しかしながら、Syncとビルドの方は問題なく行われているにもかかわらず、エミュレータが起動しないというトラブルに遭っています。一応、私が考えられる原因としてはAndroidManifestの問題が挙げられると思います。
発生している問題・エラーメッセージ
Unresolved package 'content'
Unresolved class 'FileProvider'(いずれもAndroidManifestの中のprovider内)
該当のソースコード
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.cameraapp">
</manifest><uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <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.cameraapp" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_path" /> </provider> </application>
試したこと
Open AVD Manager→Pixel API 29の項の設定を開き、Cameraの所のFrontとBackを「Emulated」に変更したが、特に変わらなかった。
補足情報(FW/ツールのバージョンなど)
Android Studio 3.6.3
使ったエミュレータについて
・Pixel2 API 29
・Resolution:1080×1920:420dpi
・Target:Android 10.0
・CPU:x86
buildToolsVersion:29.0.3
minSdkVersion:29
targetSdkVersion:29

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。