The xxx collides with a package/type

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到教程。

当类和包,重名时,包会报错误:The package aaa.a collides with a type;类也会报警告:The type a collides with a package。

 

[java]  view plain  copy
 
  1. package aaa;  
  2.   
  3. public class a  {  
  4. }  

上述的类名为(aaa.a),下述的包名也为(aaa.a),因此会报上述的错误。

 

[java]  view plain  copy
 
  1. package aaa.a;  
  2.   
  3. public class a {  
  4. }  
  5.  

 

 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
yarn add opencv-js yarn add v1.22.19 warning package.json: "dependencies" has dependency "css-loader" with range "^0.28.1" that collides with a dependency in "devDependencies" of the same name with version "^0.28.0" warning package.json: "dependencies" has dependency "webpack" with range "^2.5.0" that collides with a dependency in "devDependencies" of the same name with version "^2.2.1" warning package.json: "dependencies" has dependency "webpack-dev-server" with range "^2.4.5" that collides with a dependency in "devDependencies" of the same name with version "^2.3.0" warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. warning arc@0.1.0: "dependencies" has dependency "css-loader" with range "^0.28.1" that collides with a dependency in "devDependencies" of the same name with version "^0.28.0" warning arc@0.1.0: "dependencies" has dependency "webpack" with range "^2.5.0" that collides with a dependency in "devDependencies" of the same name with version "^2.2.1" warning arc@0.1.0: "dependencies" has dependency "webpack-dev-server" with range "^2.4.5" that collides with a dependency in "devDependencies" of the same name with version "^2.3.0" [1/4] Resolving packages... warning dragact > jest > jest-cli > jest-haste-map > sane > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 warning webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 warning @kadira/storybook > webpack > watchpack > chokidar > fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 error Received malformed response from registry for "opencv-js". The registry may be down. info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command
06-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值