Android Studio无法识别<和>标签

时间:2016-07-09 02:30:17

标签: java html android-studio compiler-errors tags

Android Studio不会识别html标签,它们会以红色突出显示,它表示"无法解析符号' gt' "而且该项目不会建立。有谁知道为什么我可以解决这个问题?任何输入都将非常感激。

这是错误:

Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2400Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72400Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42400Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2400Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:166: error: ')' expected
        if(songPosn& lt; 0) songPosn=songs.size()-1;
                       ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:166: error: not a statement
        if(songPosn& lt; 0) songPosn=songs.size()-1;
                         ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:166: error: ';' expected
        if(songPosn& lt; 0) songPosn=songs.size()-1;
                          ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:173: error: ')' expected
        if(songPosn& gt; =songs.size()) songPosn=0;
                       ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:173: error: illegal start of expression
        if(songPosn& gt; =songs.size()) songPosn=0;
                         ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:173: error: ';' expected
        if(songPosn& gt; =songs.size()) songPosn=0;
                                      ^
6 errors

:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2400Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72400Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42400Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2400Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).

/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:166: error: ')' expected
        if(songPosn& lt; 0) songPosn=songs.size()-1;
                       ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:166: error: not a statement
        if(songPosn& lt; 0) songPosn=songs.size()-1;
                         ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:166: error: ';' expected
        if(songPosn& lt; 0) songPosn=songs.size()-1;
                          ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:173: error: ')' expected
        if(songPosn& gt; =songs.size()) songPosn=0;
                       ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:173: error: illegal start of expression
        if(songPosn& gt; =songs.size()) songPosn=0;
                         ^
/home/zerodavila/AndroidStudioProjects/ZLayer4 (another copy)/app/src/main/java/com/hivemind/zerodavila/zlayer4/MusicService.java:173: error: ';' expected
        if(songPosn& gt; =songs.size()) songPosn=0;
                                      ^
6 errors

:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 19.833 secs

Total time: 1 mins 19.833 secs

1 个答案:

答案 0 :(得分:1)

我把标签全部放在一起,取而代之的是'& LT;”与<和'& GT;”使用>,工作正常。