问题
Getting error while android build
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider;${applicationId}.bugshaker.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" ></meta-data>
</provider>
Error message is:
android\app\src\main\AndroidManifest.xml:39:13-41:65: AAPT: error: resource xml/opener_paths (aka io.ionic.starter:xml/opener_paths) not found.
回答1:
I have the same error. This is what worked for me:
I went to the root project directory in a command prompt and run:
ionic cap sync
Then, it gave me another error in
android\capacitor-cordova-android-plugins\src\main\java\io\github\pwlin\cordova\plugins\fileopener2
I had to change
public class FileProvider extends android.support.v4.content.FileProvider
to
public class FileProvider extends androidx.core.content.FileProvider
Now I'm able to run the project in an Android device
来源:https://stackoverflow.com/questions/61317955/resource-xml-opener-paths-aka-io-ionic-starterxml-opener-paths-not-found