maven install报错:无法取消引用int

博客提到一个string转int的报错,原因是编译器将String值认成int,解决办法是让该值加上“”。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

这个报错是,string转int的。但这个String值被编译器认为是int,故这个值  +“”  就好了

yangxf@yangxf-virtual-machine:~/ESL_Android_Client/ZXing_android_3.2$ mvn install -Dcheckstyle.skip=true -Dandroid.sdk.path=/home/yangxf/Android/Sdk WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release [INFO] Scanning for projects... [INFO] [INFO] ----------------------< com.google.zxing:android >---------------------- [INFO] Building Android Barcode Scanner app 4.7.4 [INFO] --------------------------------[ apk ]--------------------------------- [INFO] [INFO] --- maven-checkstyle-plugin:2.16:check (validate) @ android --- [INFO] [INFO] --- maven-enforcer-plugin:1.4:enforce (enforce) @ android --- [INFO] [INFO] --- android-maven-plugin:4.1.1:generate-sources (default-generate-sources) @ android --- [INFO] Manifest copied from /home/yangxf/ESL_Android_Client/ZXing_android_3.2/AndroidManifest.xml to /home/yangxf/ESL_Android_Client/ZXing_android_3.2/target/AndroidManifest.xml [INFO] Extracting libs [INFO] Generating R file for com.google.zxing:android:apk:4.7.4 [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.160 s [INFO] Finished at: 2025-07-10T16:09:48+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.simpligility.maven.plugins:android-maven-plugin:4.1.1:generate-sources (default-generate-sources) on project android: Execution default-generate-sources of goal com.simpligility.maven.plugins:android-maven-plugin:4.1.1:generate-sources failed: Invalid SDK: Platform/API level 23 not available. This command should give you all you need: [ERROR] /home/yangxf/Android/Sdk/tools/android update sdk --no-ui --obsolete --force [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException 分析一下报错原因
最新发布
07-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值