마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

안드로이드 스튜디오 Jsoup 구문 관련 오류

0 추천
new Thread(){
        @Override
        public void run() {
            Document doc = null;
            try {
                sslTrustAllCerts();

                doc = Jsoup.connect("https://cnsu.ac.kr/").get();
                Elements contents = doc.select("a.title h2");
                strings += contents.text()+" - ";

                contents = doc.select("a.title strong");
                strings += contents.text() + "\n\n";

                contents = doc.select("ul.list");

                for(Element elem : contents) {
                    Element selem = elem.select("li").next().select("p.contents").first();
                    String str = selem.text();
                    strings += str.replace(',', '\n');
                    Log.d("로그남기기2", ""+selem.text());
                }

                bundle.putString("strings", strings);
                Message msg = handler.obtainMessage();
                msg.setData(bundle);
                handler.sendMessage(msg);

            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }.start();
}
Elements contents = doc.select("a.title h2"); < 빨간줄 오류 발생
contents = doc.select("a.title strong"); < 빨간줄 오류 발생
contents = doc.select("ul.list"); < 빨간줄 오류 발생
for(Element elem : contents) {
    Element selem = elem.select("li").next().select("p.contents").first();
    String str = selem.text();
    strings += str.replace(',', '\n');
    Log.d("로그남기기2", ""+selem.text());
} < Element elem , select , text 빨간줄 오류 발생
private void onCountClicked(String userId) {
        Log.d("onCountClicked 함수가 발동", "------------------------------------");
        Map<String, Object> childUpdates1 = new HashMap<>();
        childUpdates1.put(""+userId+"/ticket/", ServerValue.increment(1));
        mDBReference.updateChildren(childUpdates1);
    }
} < 여기서 빨간줄 오류가 발생합니다.
제발알려주세요 (120 포인트) 님이 2021년 11월 30일 질문
마우스로 코드를 선택해서 폰트색깔은 거꾸로 만들지 않으면 코드를 읽을 수가 없네요. 질문 올리실 때는 에디터에 있는 코드 버튼을 이용하세요.

답변 달기

· 글에 소스 코드 보기 좋게 넣는 법
· 질문에 대해 추가적인 질문이나 의견이 있으면 답변이 아니라 댓글로 달아주시기 바랍니다.
표시할 이름 (옵션):
개인정보: 당신의 이메일은 이 알림을 보내는데만 사용됩니다.
스팸 차단 검사:
스팸 검사를 다시 받지 않으려면 로그인하거나 혹은 가입 하세요.
...