unity3d导入jar包发布出现错误No resource found that matches the given name 'Theme.AppCompat.Light'.

Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\adt-bundle-windows-x86_64-20130729\adt-bundle-windows-x86_64-20130729\sdk\build-tools\android-4.3\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/adt-bundle-windows-x86_64-20130729/adt-bundle-windows-x86_64-20130729/sdk/platforms/android-19\android.jar" -F bin/resources.ap_

stderr[
res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
]
stdout[
Config
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
如果将应用程序打成 jar 包时出现 `SyntaxError: No language for id regex found` 的错误,可能是因为 Graal.js 无法找到正则表达式的语言支持。 解决此问题的方法是,在打包时将 Graal.js 的语言支持打包进去。可以通过以下步骤解决: 1. 在 pom.xml 文件中添加以下插件: ```xml <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.2.3</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> <configuration> <transformers> <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> <mainClass>com.example.Main</mainClass> </transformer> <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> </transformers> </configuration> </execution> </executions> </plugin> </plugins> </build> ``` 这里使用了 Maven Shade 插件,用于将 Graal.js 的语言支持打包进去。 2. 在 Java 代码中,使用以下代码来创建一个 Graal.js 的上下文对象: ```java import org.graalvm.polyglot.Context; import org.graalvm.polyglot.Source; Context context = Context.newBuilder().allowAllAccess(true).build(); Source source = Source.newBuilder("js", getClass().getResource("/script.js")).build(); context.eval(source); ``` 这里使用了 `Source.newBuilder()` 方法来创建一个包含 JavaScript 代码的 Source 对象,并通过 `context.eval(source)` 方法来执行 JavaScript 代码。 3. 在打包时,使用以下命令将 Graal.js 的语言支持打包进去: ``` mvn clean package shade:shade ``` 打包完成后,运行 jar 包时就不会再出现 `SyntaxError: No language for id regex found` 的错误了。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值