Android BUG - Error: Value must be ≥ 0 [Range]

* What went wrong:
Execution failed for task ':sample_java:lint'.
> Lint found errors in the project; aborting build.

  Fix the issues identified by lint, 
  or add the following to your build script to proceed with errors:
  ...
  android {
      lintOptions {
          abortOnError false
      }
  }
  ...
  Errors found:

  C:\...\java\MainActivity.java:257: Error: Value must be ≥ 0 [Range]
   	displayName = cursor.getString(cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME));
                                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




posted @ 2021-03-02 15:00  javakam  阅读(0)  评论(0)    收藏  举报  来源