When Android Studio is used, the source code reports a red warning everywhere. It is correct when running. androidstudio

Source: Internet
Author: User

When Android Studio is used, the source code reports a red warning everywhere. It is correct when running. androidstudio

Address: http://www.07net01.com/program/2016/04/1452749.html

 

[Abstract: When I was developing on the AS, I encountered that question, opened all the Java source files, marked with red on the right side, and found no class or method, due to the inability to jump through the face-to-face attack, the development had been entangled for a long time. I tried clean, rebuild, and other methods, but they did not play a role.]

When I encountered this problem during development on AS, I opened all the java source files, marked in red on the right side, could not find the class, and could not find the method, because I could not click to jump, so I had to struggle for a long time during development, I tried clean, rebuild, and other methods, but they didn't work for me. Some colleagues only want to say that it is unnecessary and too troublesome to install the same. After the study, I will refer to the various methods on the Internet, and now I will attach a small skill that I have personally experienced and solved, so as to avoid confusion when encountering such problems, and find the wrong way to solve the problem. (Ps: This method is solved by referring to a problem on the Internet, but the original website cannot be found. So I wrote it here for your reference only)

TIPS:

1. Click File-> Invalidate Caches/Restart...


2. Restart Gradle to clear the cache.


3. After the AS is restarted, java will not be "everywhere"

Related Recommendations
  • C # warning when referencing public variables of other namespaces: Because "***" refers to the field of the mail class, accessing the above members may cause runtime exceptions.
  • In ActionScript 3.0, runtime type check is performed for both compiling in rigorous mode and warning mode.
  • A warning and running error when referencing Enterprise Library 5.0 and Its Solution
  • Designer warning generated by loading the UI file during QT Runtime
  • Warning: As xxx references the sending class field, accessing the above Member may cause runtime exceptions.
  • Rmi activation warning when Eclipse is running
  • 27. Obtain the running information (including the running service, running task, and running process information)
  • Generate instances at runtime + call methods at runtime + change fields content at runtime
  • How can I run a program before XP starts the graphic interface? Just like the running time of the Chkdsk command or convert command that runs automatically at startup (when the C disk is converted to the NTFS format?

Keywords: Android tips source file java skills

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.