Android Studio 未显示 Java 类源代码
2022-09-02 10:48:35
我已经搜索了这个问题,并尝试了建议的解决方案,但没有成功。我有一个项目,当我去查看源文件时,假设它把我带到了java类就好了。Fragment
现在,当我去并完成所有相同的设置过程时。现在,当我单击 的源代码时,我将转到反编译类文件。File -> new project
Fragment
我的新项目是SDK 28,我已经执行了更新,但它们不会改变任何东西。通过将我的编译SDKVersion设置为27并相应地调整依赖项,它可以正常工作。但它应该只适用于SDK 28,我不明白我错过了什么
在下面的照片中,您可以看到我安装了API28的源代码
另外,当我单击下面的选项时,我收到以下IDE错误Download Sources
java.util.NoSuchElementException
at java.util.Collections$EmptyIterator.next(Collections.java:4189)
at org.jetbrains.plugins.gradle.util.GradleAttachSourcesProvider.getSourceFile(GradleAttachSourcesProvider.java:160)
at org.jetbrains.plugins.gradle.util.GradleAttachSourcesProvider.access$100(GradleAttachSourcesProvider.java:59)
at org.jetbrains.plugins.gradle.util.GradleAttachSourcesProvider$1$1.onSuccess(GradleAttachSourcesProvider.java:126)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$7.execute(ExternalSystemUtil.java:876)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$9.run(ExternalSystemUtil.java:905)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:713)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:157)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:543)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:488)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:94)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:165)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:315)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
我的 gradle 文件具有正确的 SDK 集,您可以在项目结构的外部库部分看到.jar文件夹
但是当我点击源代码时,我看到的只是反编译类!