Resource xml/opener_paths (aka io.ionic.starter:xml/opener_paths) not found

岁酱吖の 提交于 2021-02-08 06:36:36

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!