调用bsh方法时出错:eval源文件:对以下内容的内联评估:''import java.security.messageDigest

问题描述

处于危险状态

  private fun ShowData() {
   var tip =  mfirebasedatabase!!.getReference("Model").orderByChild("a")
    options = FirebaseRecyclerOptions.Builder<Model>().setQuery(tip,Model::class.java).build()
    mfirebaseRecyclerAdapter = object : FirebaseRecyclerAdapter<Model,ViewHolder>(options!!) {
        override fun onBindViewHolder(viewHolder: ViewHolder,i: Int,model: Model) {
            viewHolder.setDetails(applicationContext,model.image,model.title)
        }

        override fun onCreateViewHolder(parent: ViewGroup,viewType: Int): ViewHolder {
            val itemview = LayoutInflater.from(parent.context).inflate(R.layout.row,parent,false)
            val viewHolder = ViewHolder(itemview)
            var sh :Button = itemview.findViewById<Button>(R.id.buttontoShare)
            sh.setonClickListener {
              // how to get the Model.image so that i can implement
                //share intent to share data to other apps?

            }

为什么为什么为什么!!!!!!

import java.security.MessageDigest;
import java.util.Random;
...... 

认情况下已安装Java 8。

为什么不呢?

解决方法

因为Java类名区分大小写

$ mvn checkstyle:check
[INFO] Scanning for projects...
[INFO] 
[INFO] -------------------< net.gencat.clt.arxius:backend >--------------------
[INFO] Building backend 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.1.1:check (default-cli) @ backend ---
[INFO] There are 4 errors reported by Checkstyle 8.29 with sun_checks.xml ruleset.
[ERROR] src/main/java/net/gencat/clt/arxius/backend/BackendApplication.java:[1] (javadoc) JavadocPackage: Missing package-info.java file.
[ERROR] src/main/java/net/gencat/clt/arxius/backend/BackendApplication.java:[6,1] (design) HideUtilityClassConstructor: Utility classes should not have a public or default constructor.
[ERROR] src/main/java/net/gencat/clt/arxius/backend/BackendApplication.java:[9,1] (whitespace) FileTabCharacter: File contains tab characters (this is the first instance).
[ERROR] src/main/java/net/gencat/clt/arxius/backend/BackendApplication.java:[9,9] (javadoc) MissingJavadocMethod: Missing a Javadoc comment.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.265 s
[INFO] Finished at: 2020-10-21T10:45:52+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:3.1.1:check (default-cli) on project backend: You have 4 Checkstyle violations. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors,re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions,please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

也:

,

我是韩国人。 我不会英语。

不! 导入java.security.messageDigest是输入错误。

java.security.MessageDigest。

为什么不呢?为什么不呢?

没有错字。