FindBugs IDEA - ClassNotFoundException com.google.wireless.android.sdk.stats.IntellijIndexingStats

前端 未结 9 855
抹茶落季
抹茶落季 2020-11-30 02:58

FindBugs IDEA v1.0.1 Android Studio 3.4

I get this error when running FindBugs. I don\'t use com.google.wireless.android.sdk anywhere in the app.

Err         


        
相关标签:
9条回答
  • 2020-11-30 03:14

    I got this error in Android Studio without running FindBugs.

    I initially saw an IntelliJ post suggesting I disable compiler-based indexing in the IntelliJ registry to stop the error:

    as a workaround for the exception you may set compiler.ref.index = false in Registry (ctrl+alt-shift+/ or via "find action by name" action)

    However, I didn't want to settle for losing compiler-based indexing, after doing an Invalidate Caches / Restart..., I saw the following message:

    Internal caches are corrupted or have outdated format, forcing project rebuild
    

    That message led me to pdinklag's answer, which I modified slightly for Android Studio

    I shut down Android Studio, then ran:

    rm -rf ~/.android
    rm -rf <PROJECT_ROOT>/.idea
    

    Then restarted Android Studio, and things worked.

    0 讨论(0)
  • 2020-11-30 03:17

    This removed the error for me:

    File/Settings/Build, Execution, Deployment/Compiler

    uncheck: Make project automatically

    0 讨论(0)
  • 2020-11-30 03:17

    I faced similar error with JDK 1.8. The error was caused by a missing keystore file. Try generating new keystore using a keytool from JDK 12. This worked for me.

    Also add some dependencies and maven repositories according to yout gradle version may be also need to AndroidAnnotations version:

    4.3.1

    Android compile SDK version:

    25

    0 讨论(0)
  • 2020-11-30 03:18

    I think this may be the answer.

    SpotBugs is the spiritual successor of FindBugs, carrying on from the point where it left off with support of its community.

    The FindBugs Plugin

    Since FindBugs is unmaintained and does not support bytecode compiled for Java 9 and above, the FindBugs plugin has been deprecated and is scheduled to be removed in Gradle 6.0. Please consider using the SpotBugs plugin instead.

    You should have at least 512 MB of memory to use SpotBugs. To analyze very large projects, more memory may be needed.

    Very important issue Unable to use Spotbugs in Android application.

    0 讨论(0)
  • 2020-11-30 03:21

    Seems that FindBugs is not able to compile the files before analyze.

    In Android Studio, go to FindBugs settings (found under File > Settings > Other Settings), and UNCHECK "Compile affected files before analyze".

    When you do this, then you need to compile files yourself (by building and running the app, for example), or FindBugs analyze uses old file data (from the previous build).

    0 讨论(0)
  • 2020-11-30 03:22

    open the FindBugs setting, click General,then close the "Compile affected files before analyze". It works for me with Android Studio 3.5

    0 讨论(0)
提交回复
热议问题