简体   繁体   English

Gradle 未正确构建类名

[英]Gradle not building classname correctly

So I had a class named 'Helloworld' and have built the project with Gradle once after that I decided to rename the class into 'HelloWorld', and for some reason when I build it again and check inside the jar file I still have 'Helloworld.class' which is causing me problems as I need the exact class name. So I had a class named 'Helloworld' and have built the project with Gradle once after that I decided to rename the class into 'HelloWorld', and for some reason when I build it again and check inside the jar file I still have 'Helloworld .class' 这给我带来了问题,因为我需要确切的 class 名称。

I tried deleting the.gradle/caches but it didn't work.我尝试删除 the.gradle/caches 但它没有用。

I'm not really sure what files I should post to check if something is wrong so if someone comments I will edit the post.我不确定我应该发布哪些文件来检查是否有问题,所以如果有人评论我会编辑帖子。

If I were you, I'd just recreate the project altogether.如果我是你,我会完全重新创建项目。 Otherwise, are you able to rename the.class file that's causing you problems?否则,您是否可以重命名导致您出现问题的.class 文件?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM