java – Android studio:当我尝试将Class移到另一个包时,警告

这是一个错误msg.
Method Object.toString(),referenced in method SettingActivity.saveDataButtons(),will not be accessible in module personal-health-assistant back up 29 oct  

Method String.trim(),referenced in method SettingActivity.setNullCurrentFocusedEditText(),will not be accessible in module personal-health-assistant back up 29 oct  

Method String.length(),will not be accessible in module personal-health-assistant back up 29 oct

我想知道

>如何发生这种情况?为什么有些方法不能在模块中访问?
是吗?
>如何解决这个警告?

解决方法

对于无法访问的非公共方法,通常会发出此警告(因为将其从包中移出可防止初始包的其他成员访问它).

然而,因为在你的情况下,SettingActivity正在访问相当常见的类Object和String,而且它们的公共方法也似乎是将它移动到一个没有连接到SDK的包中.

“个人健康助理备份29 oct”可能会配置另一个SDK(非Android)

相关文章

Android 如何解决dialog弹出时无法捕捉Activity的back事件 在...
Android实现自定义带文字和图片的Button 在Android开发中经常...
Android 关于长按back键退出应用程序的实现最近在做一个Andr...
android自带的时间选择器只能精确到分,但是对于某些应用要求...