Код: Выделить всё
./gradlew build
> Task :app:compileDebugJavaWithJavac
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:15: error: cannot find symbol
import com.gorisse.thomas.sceneform.ArFragment;
^
symbol: class ArFragment
location: package com.gorisse.thomas.sceneform
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:16: error: package com.gorisse.thomas.sceneform.rendering does not exist
import com.gorisse.thomas.sceneform.rendering.ModelRenderable;
^
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:27: error: cannot find symbol
private ArFragment arFragment;
^
symbol: class ArFragment
location: class MainActivity
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:28: error: cannot find symbol
private ModelRenderable modelRenderable;
^
symbol: class ModelRenderable
location: class MainActivity
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:39: error: cannot find symbol
arFragment = (ArFragment) getSupportFragmentManager().findFragmentById(R.id.arFragment);
^
symbol: class ArFragment
location: class MainActivity
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:101: error: cannot find symbol
ModelRenderable.builder()
^
symbol: variable ModelRenderable
location: class MainActivity
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:111: error: cannot find symbol
ModelRenderable.builder()
^
symbol: variable ModelRenderable
location: class MainActivity
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:122: error: package com.gorisse.thomas.sceneform.ux does not exist
com.gorisse.thomas.sceneform.ux.TransformableNode node = new com.gorisse.thomas.sceneform.ux.TransformableNode(arFragment.getTransformationSystem());
^
C:\Users\GOAT\Desktop\equation3dviewer\app\src\main\java\com\example\equation3dviewer\MainActivity.java:122: error: package com.gorisse.thomas.sceneform.ux does not exist
com.gorisse.thomas.sceneform.ux.TransformableNode node = new com.gorisse.thomas.sceneform.ux.TransformableNode(arFragment.getTransformationSystem());
^
9 errors
> Task :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 --info option to get more log output.
> Run with --scan to get full insights.
BUILD FAILED in 5s
18 actionable tasks: 2 executed, 16 up-to-date
./gradlew build
Однако я сталкиваюсь с ошибками компиляции, связанных с импортом сцены, в частности: < /p>
com.gorisse.thomas.sceneform.ArFragment
com.gorisse.thomas.sceneform.rendering.ModelRenderable
com.gorisse.thomas.sceneform.ux.TransformableNode
< /code>
Сообщения об ошибках указывают на то, что эти классы не могут быть найдены, предполагая, что зависимости отсутствуют или не разрешаются должным образом. < /p>
Шаги, которые я пробовал до сих пор : < /p>
1. Зарегистрированные зависимости градл:
- Я проверил, что зависимости от сцены включены в build.gradle:
implementation 'com.gorisse.thomas.sceneform:sceneform:1.21.0'
}
< /code>
- Также пробовал сценаром и сценариальной формы, но все же получает ту же ошибку. < /li>
< /ul>
2. Сингниция Gradle:
ran "Проект синхронизации с Gradle Files" в Android Studio. - Попробовал ./ gradlew clean и ./ gradlew build снова.
[*] подтвердили, что мои операторы импорта соответствуют правильным именам пакетов из сцены.
4. Вручную добавлены зависимости: < /strong> < /p>
Я попытался вручную загрузить необходимые зависимости и добавить их в виде. . < /li>
< /ul>
ожидаемое поведение < /strong>
Я ожидал, что сборка Gradle успешно завершит, распознавая и разрешая все зависимости от сцены, поэтому чтобы я мог бы продолжить с запуском моего приложения Ar. классы не распознаются.
Подробнее здесь: https://stackoverflow.com/questions/794 ... oid-studio
Мобильная версия