程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长


+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

Cannot resolve symbol error in Java class Android studio [closed]

发布于2022-09-29 09:54     阅读(1189)     评论(0)     点赞(19)     收藏(1)


Whenever I type in class to test my java code some red curly lines appear in toolbox and android studio code and it gives symbol error for every word typed in.

I have tried uninstalling and reinstalling, invalidate caches , rebuild e.t.c but none of them worked.

code

package com.example.lib;

public class MyClass {
    public static void main(String[] args) {
        System.out.println("Hello world!");
    }
}

Error code

Cannot resolve symbol 'String'
Cannot resolve symbol 'System'

Image

Click here to see the image


解决方案


Try to add the missing space between static and void.



所属网站分类: 技术文章 > 问答

作者:黑洞官方问答小能手

链接:http://www.javaheidong.com/blog/article/523963/3a2441b9398aab70b443/

来源:java黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

19 0
收藏该文
已收藏

评论内容:(最多支持255个字符)