Android 如何解决:错误:处理清单失败
我是爱奥尼亚、安卓和Moodle的新手,我在尝试生成自定义Moodle apk时出现了几个错误,我来这里是为了帮助解决这个使用应用程序ID生成的错误 我做了如下工作,我将原始的Moodle ID更改为我的应用程序,我正在用Grandle修复错误,我很好地配置了SDK,我链接了JDK,我构建、编译和传输了很多次,这就是为什么我现在只直接适应命令 我怀疑这可能是config.xml中的一个错误,我不知道,或者是通过使用包更改id_应用程序的名称而创建的文件夹中的一个错误 执行Android 如何解决:错误:处理清单失败,android,xml,cordova,ionic-framework,moodle-mobile,Android,Xml,Cordova,Ionic Framework,Moodle Mobile,我是爱奥尼亚、安卓和Moodle的新手,我在尝试生成自定义Moodle apk时出现了几个错误,我来这里是为了帮助解决这个使用应用程序ID生成的错误 我做了如下工作,我将原始的Moodle ID更改为我的应用程序,我正在用Grandle修复错误,我很好地配置了SDK,我链接了JDK,我构建、编译和传输了很多次,这就是为什么我现在只直接适应命令 我怀疑这可能是config.xml中的一个错误,我不知道,或者是通过使用包更改id_应用程序的名称而创建的文件夹中的一个错误 执行cordova.cmd
cordova.cmd build android--release
[...]
> Task :app:processDebugResources
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
C:\..\moodleapp\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:76: AAPT: error: resource xml/provider_paths (aka com.mycustom.app:xml/provider_paths) not found.
C:\..\moodleapp\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:85: AAPT: error: resource xml/camera_provider_paths (aka com.mycustom.app:xml/camera_provider_paths) not found.
C:\..\moodleapp\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:99: AAPT: error: resource xml/opener_paths (aka com.mycustom.app:xml/opener_paths) not found.
error: failed processing manifest.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
FAILED
23 actionable tasks: 1 executed, 22 up-to-date
C:\..\moodleapp\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
C:\..\moodleapp\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:76: AAPT: error: resource xml/provider_paths (aka com.mycustom.app:xml/provider_paths) not found.
C:\..\moodleapp\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:85: AAPT: error: resource xml/camera_provider_paths (aka com.mycustom.app:xml/camera_provider_paths) not found.
C:\..\moodleapp\platforms\android\app\build\intermediates\merged_manifests\debug\AndroidManifest.xml:99: AAPT: error: resource xml/opener_paths (aka com.mycustom.app:xml/opener_paths) not found.
error: failed processing manifest.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 10s
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android --buildFlag=-UseModernBuildSystem=0 exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
C:\..\moodleapp>_
我的Moodle AndroidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true"
android:versionCode="10000"
android:versionName="1.0"
package="com.mycustom.app"
xmlns:android="http://schemas.android.com/apk/res/android">
[...more code...]
<provider android:authorities="${applicationId}.darryncampbell.cordova.plugin.intent.fileprovider"
android:exported="false"
android:grantUriPermissions="true"
android:name="com.darryncampbell.cordova.plugin.intent.CordovaPluginIntentFileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>
<provider android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true"
android:name="org.apache.cordova.camera.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/camera_provider_paths" />
</provider>
<meta-data android:name="firebase_analytics_collection_deactivated"
android:value="true" />
<provider android:authorities="${applicationId}.opener.provider"
android:exported="false"
android:grantUriPermissions="true"
android:name="io.github.pwlin.cordova.plugins.fileopener2.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/opener_paths" />
</provider>
</application>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
[…更多代码…]
我只想生成apk,moodle文档的步骤对我来说并不有用
链接Moodle应用程序
我的项目
Doc Moodle应用程序看起来您丢失了一些文件 您需要将此资源添加到config.xml中,但首先在资源管理器中查找文件,并将其写入真实路径,而不是res/xml/ 资料来源:
我照你说的做了,当我添加了3行
及其修补程序并替换config.xml中@xml/
的res/xml时,我得到了一个不同的结果。这是我的结果AndroidManifest.xml:115:AAPT:error:在中找到了意外元素。
我不知道我做得太糟了。我找到的另一个路径是src/res/xml
将res/xml
更改为@xml
<platform name="android">
<resource-file src="res/xml/opener_paths.xml" target="res/xml/opener_paths.xml" />
<resource-file src="res/xml/camera_provider_paths.xml" target="res/xml/camera_provider_paths.xml" />
<resource-file src="res/xml/provider_paths.xml" target="res/xml/provider_paths.xml" />
</platform>