码迷,mamicode.com
首页 > 移动开发 > 详细

android The public type classname must be defined in its own file 报错

时间:2015-03-18 12:22:11      阅读:121      评论:0      收藏:0      [点我收藏+]

标签:

The public type classname must be defined in its own file

classname  为类名

错误提示,公用的类必髯有自己拥有独立.java文件

解决方法:

在工程中新建一份.java文件,然后把类重新定义为公用类public

 

解决方法2:

如果你的类只需用在当前,则可更改为私有类,即将public改为private

android The public type classname must be defined in its own file 报错

标签:

原文地址:http://www.cnblogs.com/jenson138/p/4346722.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!