Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol not found #570

Open
HChenX opened this issue Apr 16, 2024 · 6 comments
Open

Symbol not found #570

HChenX opened this issue Apr 16, 2024 · 6 comments

Comments

@HChenX
Copy link

HChenX commented Apr 16, 2024

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):

  • OS Type & Version: win11
  • Java/JDK version: jdk21
  • IDE version (IntelliJ IDEA or Android Studio):
    Android Studio Iguana | 2023.2.1 Patch 2
    Build #AI-232.10300.40.2321.11668458, built on April 4, 2024
  • Manifold version: new
  • Manifold IntelliJ plugin version: new

Additional context
image

@rsmckinney
Copy link
Member

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
Copy link
Author

HChenX commented Apr 17, 2024

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.String>, 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.String>, 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.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:

Run with --info option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 4s

@rsmckinney
Copy link
Member

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

@HChenX
Copy link
Author

HChenX commented Apr 18, 2024

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

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

@rsmckinney
Copy link
Member

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
Copy link
Author

HChenX commented Apr 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants