如何解决Android资源链接在构建中失败
在构建android(离子+电容器)项目时遇到一些错误。我在构建过程中使用的是android studio。生成的android manifest.xml文件给了我一些android资源链接错误。要清除,它是一个生成的文件。
它位于:Map<String,List<CompanyEntity>> mapData =
mainEntityList
.stream()
.collect(Collectors.groupingBy(MainEntity::getKeyWord,Collectors.groupingBy(MainEntity::getCtr,Collectors.averagingDouble(MainEntity::getCtr))))
.entrySet()
.stream()
.collect(Collectors.toMap(m -> m.getKey(),m -> m.entrySet()
.stream()
.sorted(Comparator.comparing(e -> e.getValue()))
.map(e -> new CompanyEntity(e.getKey(),e.getValue()))
.collect(Collectors.toList())));
以下错误的示例:
android/capacitor-cordova-android-plugins/build/intermediates/library_manifest/debug/AndroidManifest.xml
URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs)
Attribute android:configChanges is not allowed here
Attribute android:versionCode is not allowed here
Attribute android:enabled is not allowed here
我确实尝试更新所有依赖项,并清理并重建项目。这个问题应该在哪里或如何解决?
解决方法
我遇到了同样的问题,对我有用的是为 facebook 插件添加缺少的字符串。在 android studio 中转到 capacitor-android/res/values/strings.xml
并添加以下变量:
<string name="fb_app_id">[YOUR_APP_ID]</string>
<string name="fb_app_name">[YOUR_APP_NAME]</string>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。