错误信息:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x71871a5e) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x71871a5e
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in …Run Code Online (Sandbox Code Playgroud) 我有一个TextView显示除链接之外的所有插入文本的文本,但它们应该所在的位置仍然可单击并将我带到所需的目的地。什么会使链接本身不可见?
来自字符串资源
<string name="credits">Video from <a href="http://youtube.com">Youtube</a></string>
Run Code Online (Sandbox Code Playgroud)
从布局来看
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="@color/colorAccent"
android:fontFamily="@font/abril_fatface"
android:lineSpacingExtra="12sp"
android:paddingLeft="16dp"
android:paddingTop="75dp"
android:paddingRight="16dp"
android:text="@string/credits"
android:textAlignment="center"
android:textColor="@color/colorPrimaryDark"
android:textSize="30sp" />
Run Code Online (Sandbox Code Playgroud)
来自活动
textCredits.movementMethod = LinkMovementMethod.getInstance()
Run Code Online (Sandbox Code Playgroud)