manifold-systems / manifold

Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
http://manifold.systems/
Apache License 2.0
2.4k stars 125 forks source link

Symbol not found #570

Closed HChenX closed 1 month ago

HChenX commented 6 months ago

Describe the bug When I extend the String function and call the method. Error 'symbol not found' during project construction.

Screenshots image

Desktop (please complete the following information):

Additional context image

rsmckinney commented 6 months ago

Hi @HChenX. For android it is usually best to use compileOnly dependencies rather than annotationProcessor. Not sure why that is with manifold/android. See android docs.

. . .
compileOnly libs.systems.manifold.ext
HChenX commented 6 months ago

Hi @HChenX. For android it is usually best to use compileOnly dependencies rather than annotationProcessor. Not sure why that is with manifold/android. See android docs.

. . .
compileOnly libs.systems.manifold.ext

image image

I have configured it according to what you said. But he still reported an error. If I don't add the tasks task, it will report an error saying "symbol not found". If I add it, it will generate the error shown in the above figure. error: java/lang/String.java:5: 错误: 程序包java.lang.constant不存在 public final class String extends java.lang.Object implements java.io.Serializable, java.lang.Comparable, java.lang.CharSequence, java.lang.constant.Constable, java.lang.constant.ConstantDesc { ^ java/lang/String.java:5: 错误: 程序包java.lang.constant不存在 public final class String extends java.lang.Object implements java.io.Serializable, java.lang.Comparable, java.lang.CharSequence, java.lang.constant.Constable, java.lang.constant.ConstantDesc { ^ java/lang/String.java:222: 错误: 找不到符号 private boolean nonSyncContentEquals(java.lang.AbstractStringBuilder arg0) { ^ 符号: 类 AbstractStringBuilder 位置: 程序包 java.lang java/lang/String.java:469: 错误: 找不到符号 String(java.lang.AbstractStringBuilder arg0, java.lang.Void arg1) { ^ 符号: 类 AbstractStringBuilder 位置: 程序包 java.lang java/lang/String.java:20: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.IntrinsicCandidate() ^ java/lang/String.java:339: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.ForceInline() ^ java/lang/Object.java:6: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.IntrinsicCandidate() ^ java/lang/Object.java:10: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.IntrinsicCandidate() ^ java/lang/Object.java:14: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.IntrinsicCandidate() ^ java/lang/Object.java:21: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.IntrinsicCandidate() ^ java/lang/Object.java:28: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.IntrinsicCandidate() ^ java/lang/Object.java:32: 错误: 程序包jdk.internal.vm.annotation不存在 @jdk.internal.vm.annotation.IntrinsicCandidate() ^ 12 个错误 FAILURE: Build failed with an exception.

BUILD FAILED in 4s

rsmckinney commented 6 months ago

Is your project accessible? It will make diagnosing the problem.

HChenX commented 6 months ago

Is your project accessible? It will make diagnosing the problem.您的项目是否可访问?它将使诊断问题成为可能。

Of course. This is the Github warehouse address: https://github.com/HChenX/HookTool

rsmckinney commented 6 months ago

Thanks! But your project requires android 8.3.2, but I test with latest IntelliJ (2024.1) which only supports up to 8.2.0. When I change your project to 8.2.0 it fails with a jlink error. Any chance you can supply a version that compiles against 8.2.0?

HChenX commented 6 months ago

Thanks! But your project requires android 8.3.2, but I test with latest IntelliJ (2024.1) which only supports up to 8.2.0. When I change your project to 8.2.0 it fails with a jlink error. Any chance you can supply a version that compiles against 8.2.0?

Based on my testing, you can change the project jdk to 17 It may be an issue with JDK21. If it still doesn't work, you can try clearing to build the cache.