Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/353.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 表达式需要android_Java_Android_Android Studio - Fatal编程技术网

Java 表达式需要android

Java 表达式需要android,java,android,android-studio,Java,Android,Android Studio,我试图在文本视图中显示我的摘要结果。是否有任何语法可以使用,而不是返回摘要,因为我得到一个未知表达式的错误,我不知道任何其他语法 //construct the summary size out of select sentences String summary = ""; summary = summary + "• " + firstSentence + System.getProperty("line.separator") + System.getProper

我试图在文本视图中显示我的摘要结果。是否有任何语法可以使用,而不是返回摘要,因为我得到一个未知表达式的错误,我不知道任何其他语法

    //construct the summary size out of select sentences
    String summary = "";
    summary = summary + "• " + firstSentence +  System.getProperty("line.separator") + System.getProperty("line.separator");

    for(String sentence : sentences)//foreach string sentence in sentences list
    {
        if(setSummarySentences.contains(sentence))
        {
            //produce each sentence with a bullet point and good amounts of spacing
            summary = summary + "• " + sentence +  System.getProperty("line.separator") + System.getProperty("line.separator");
        }
    }
    return summary;
}

}

您的错误如下:

 TextView textView3 = return summary;
您试图将
return
语句分配给变量,这不是有效的语法


请查看,特别是在和部分。

TextView textView3=返回摘要;是的,这就是问题所在请看:@JRowan这就是我遇到的问题所在,因为它是无意义和无效的语法。如果你解释一下你到底想做什么,也许我们能帮上忙。