Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Bug Unable to import Unity project into Android Studio for use in WearOS-focused app

Discussion in 'Android' started by Little_Robot_Guys, Apr 18, 2024.

  1. Little_Robot_Guys

    Little_Robot_Guys

    Joined:
    May 7, 2018
    Posts:
    6
    Looking to do a simple game and test on my Pixel Watch 2.

    Using WearOS 4.0, I've been following a mix of these:

    This thread:
    https://forum.unity.com/threads/aab...el-33-on-unity-2021-3-8-with-jdk-1-8.1322211/

    and this blog from a while ago:
    https://www.stonegolemstudio.com/post/unity3d-to-wear-os-tutorial

    The Unity documentation, specifically the android build settings page:
    https://docs.unity3d.com/Manual/android-build-settings.html

    On Unity 2020.3.33f1 for reasons, can export (from Unity) to an AAB as long as using Target API Level 'Android 11.0 (API level 30)', via IL2CPP. When importing the project (Importing the Module in current Android Studio does nothing, to my knowledge), I get all kinds of errors in Android studio when it comes to importing the project and letting Gradle do its thing. I'm running in circles now and feel stuck.

    Here's the pertinent info I know people will want to see, and please ask if there's more:

    Build settings:
    upload_2024-4-18_16-39-31.png

    Player Settings:
    upload_2024-4-18_16-41-54.png


    And the error in Android Studio:
    Code (CSharp):
    1. Build file 'D:\Unity\ws\WearDice\Build\launcher\build.gradle' line: 1
    2.  
    3. A problem occurred evaluating project ':launcher'.
    4. > Failed to apply plugin 'com.android.application'.
    5.    > Could not create an instance of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.
    6.       > Could not create an instance of type com.android.build.gradle.internal.dsl.TestOptions.
    7.          > Could not create an instance of type com.android.build.gradle.internal.dsl.TestOptions$UnitTestOptions.
    8.             > 'void org.gradle.api.internal.DefaultDomainObjectSet.<init>(java.lang.Class)'
    9.  
    10. * Try:
    11. > Run with --stacktrace option to get the stack trace.
    12. > Run with --info or --debug option to get more log output.
    13. > Run with --scan to get full insights.
    14. > Get more help at https://help.gradle.org.
    15. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
    16. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
    17. For more on this, please refer to https://docs.gradle.org/8.2/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
    18. BUILD FAILED in 244ms

    When running with --info:
    Code (CSharp):
    1. Build file 'D:\Unity\ws\WearDice\Build\launcher\build.gradle' line: 1
    2.  
    3. A problem occurred evaluating project ':launcher'.
    4. > Failed to apply plugin 'com.android.application'.
    5.    > Could not create an instance of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.
    6.       > Could not create an instance of type com.android.build.gradle.internal.dsl.TestOptions.
    7.          > Could not create an instance of type com.android.build.gradle.internal.dsl.TestOptions$UnitTestOptions.
    8.             > 'void org.gradle.api.internal.DefaultDomainObjectSet.<init>(java.lang.Class)'
    There is basically nothing in the project so far, I just wanted to see something get on the watch first, but I can't even get that far.

    Is there anyone out there that has some advice for building for WearOS, or where to look for hints/ideas on what I could be doing wrong?

    -- I just realized someone may ask, "Why even use Android Studio in the first place, if you're just trying to see it work on your device? Just build to an APK and sideload it!" Yes, I have thought of that, but side-loading onto WearOS 4 is tricky, nigh-impossible even. The solutions I've found on the web include downloading separate programs on my phone that can then sync with the watch and load them that way, but as Unity doesn't build things in a Component (which WearOS needs), I've only met with failure there. One would THINK a standard APK could just work on a derivative of Android, but no. Thus the need for the extra step (which is why I used the blog I posted above as a starting point).
     
  2. Little_Robot_Guys

    Little_Robot_Guys

    Joined:
    May 7, 2018
    Posts:
    6
    Clarification on the tag of 'bug': If I follow the Unity-prescribed steps to import into Android Studio via their own documentation, it should work; however it does not.
     
  3. Little_Robot_Guys

    Little_Robot_Guys

    Joined:
    May 7, 2018
    Posts:
    6
    Hey Look What I found:

    This topic in Unity Support has gotten me a little further:
    https://support.unity.com/hc/en-us/...adle-and-building-deploying-on-Android-Studio

    Posting this for anyone else having these issues. I'll update this reply with the results once I finish going through these steps (gradle needed an update after the step listed where I use a different local Gradle instance)

    Here's the Update
    So I ran into an issue right away and nope I don't know what to do about it. 'UnityDataAssetPack' sounds important, but again, this is a pretty barebones project (the only Packages I've pulled in are published by Unity like TextMeshPro and the Code editor plugins).


    Code (CSharp):
    1. Build file 'D:\Unity\ws\WearDice\Build\launcher\build.gradle' line: 63
    2.  
    3. A problem occurred evaluating project ':launcher'.
    4. > Could not set unknown property 'assetPacks' for extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.
    5.  
    6. * Try:
    7. Run with --debug option to get more log output. Run with --scan to get full insights.
    8.  
    9. * Exception is:
    10. org.gradle.api.GradleScriptException: A problem occurred evaluating project ':launcher'.
    11.     at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
    12.     at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
    13.     at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:79)
    14.     at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
    15.     at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
    16.     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    17.     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    18.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    19.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    20.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    21.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    22.     at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
    23.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:74)
    24.     at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
    25.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:74)
    26.     at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
    27.     at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:44)
    28.     at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
    29.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:325)
    30.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:352)
    31.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:324)
    32.     at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:42)
    33.     at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
    34.     at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:35)
    35.     at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:100)
    36.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:325)
    37.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:385)
    38.     at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211)
    39.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:385)
    40.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:366)
    41.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:324)
    42.     at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
    43.     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    44.     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    45.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    46.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    47.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    48.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    49.     at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
    50.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:74)
    51.     at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
    52.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:74)
    53.     at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
    54.     at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:750)
    55.     at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:150)
    56.     at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.ensureConfigured(DefaultProjectStateRegistry.java:298)
    57.     at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:41)
    58.     at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:57)
    59.     at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:50)
    60.     at org.gradle.configuration.BuildTreePreparingProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:64)
    61.     at org.gradle.configuration.BuildOperationFiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.java:52)
    62.     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    63.     at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    64.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    65.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    66.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    67.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    68.     at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
    69.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:74)
    70.     at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
    71.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:74)
    72.     at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
    73.     at org.gradle.initialization.VintageBuildModelController.prepareProjects(VintageBuildModelController.java:97)
    74.     at org.gradle.initialization.VintageBuildModelController.doBuildStages(VintageBuildModelController.java:77)
    75.     at org.gradle.initialization.VintageBuildModelController.prepareToScheduleTasks(VintageBuildModelController.java:64)
    76.     at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$prepareToScheduleTasks$0(DefaultBuildLifecycleController.java:104)
    77.     at org.gradle.internal.build.DefaultBuildLifecycleController.lambda$withModelOrThrow$5(DefaultBuildLifecycleController.java:142)
    78.     at org.gradle.internal.build.DefaultBuildLifecycleController.withModel(DefaultBuildLifecycleController.java:157)
    79.     at org.gradle.internal.build.DefaultBuildLifecycleController.withModelOrThrow(DefaultBuildLifecycleController.java:140)
    80.     at org.gradle.internal.build.DefaultBuildLifecycleController.prepareToScheduleTasks(DefaultBuildLifecycleController.java:102)
    81.     at org.gradle.internal.buildtree.DefaultBuildTreeWorkPreparer.scheduleRequestedTasks(DefaultBuildTreeWorkPreparer.java:33)
    82.     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$doScheduleAndRunTasks$1(DefaultBuildTreeLifecycleController.java:83)
    83.     at org.gradle.composite.internal.DefaultIncludedBuildTaskGraph.withNewTaskGraph(DefaultIncludedBuildTaskGraph.java:94)
    84.     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.doScheduleAndRunTasks(DefaultBuildTreeLifecycleController.java:82)
    85.     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.lambda$fromBuildModel$0(DefaultBuildTreeLifecycleController.java:71)
    86.     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.runBuild(DefaultBuildTreeLifecycleController.java:104)
    87.     at org.gradle.internal.buildtree.DefaultBuildTreeLifecycleController.fromBuildModel(DefaultBuildTreeLifecycleController.java:69)
    88.     at org.gradle.tooling.internal.provider.runner.AbstractClientProvidedBuildActionRunner.runClientAction(AbstractClientProvidedBuildActionRunner.java:56)
    89.     at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:53)
    90.     at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    91.     at org.gradle.internal.buildtree.ProblemReportingBuildActionRunner.run(ProblemReportingBuildActionRunner.java:47)
    92.     at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:69)
    93.     at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:91)
    94.     at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    95.     at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.lambda$execute$0(RootBuildLifecycleBuildActionExecutor.java:40)
    96.     at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:154)
    97.     at org.gradle.launcher.exec.RootBuildLifecycleBuildActionExecutor.execute(RootBuildLifecycleBuildActionExecutor.java:40)
    98.     at org.gradle.internal.buildtree.DefaultBuildTreeContext.execute(DefaultBuildTreeContext.java:40)
    99.     at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.lambda$execute$0(BuildTreeLifecycleBuildActionExecutor.java:56)
    100.     at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:53)
    101.     at org.gradle.launcher.exec.BuildTreeLifecycleBuildActionExecutor.execute(BuildTreeLifecycleBuildActionExecutor.java:56)
    102.     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:61)
    103.     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor$3.call(RunAsBuildOperationBuildActionExecutor.java:57)
    104.     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
    105.     at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
    106.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    107.     at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    108.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    109.     at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    110.     at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
    111.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
    112.     at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
    113.     at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
    114.     at org.gradle.launcher.exec.RunAsBuildOperationBuildActionExecutor.execute(RunAsBuildOperationBuildActionExecutor.java:57)
    115.     at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.lambda$execute$0(RunAsWorkerThreadBuildActionExecutor.java:38)
    116.     at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:211)
    117.     at org.gradle.launcher.exec.RunAsWorkerThreadBuildActionExecutor.execute(RunAsWorkerThreadBuildActionExecutor.java:38)
    118.     at org.gradle.tooling.internal.provider.ContinuousBuildActionExecutor.execute(ContinuousBuildActionExecutor.java:103)
    119.     at org.gradle.tooling.internal.provider.SubscribableBuildActionExecutor.execute(SubscribableBuildActionExecutor.java:64)
    120.     at org.gradle.internal.session.DefaultBuildSessionContext.execute(DefaultBuildSessionContext.java:46)
    121.     at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.lambda$execute$0(BuildSessionLifecycleBuildActionExecuter.java:56)
    122.     at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:69)
    123.     at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:55)
    124.     at org.gradle.tooling.internal.provider.BuildSessionLifecycleBuildActionExecuter.execute(BuildSessionLifecycleBuildActionExecuter.java:37)
    125.     at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
    126.     at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
    127.     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:63)
    128.     at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    129.     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:58)
    130.     at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:42)
    131.     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    132.     at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    133.     at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    134.     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    135.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    136.     at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    137.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    138.     at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    139.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    140.     at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    141.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    142.     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
    143.     at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
    144.     at org.gradle.util.internal.Swapper.swap(Swapper.java:38)
    145.     at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
    146.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    147.     at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    148.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    149.     at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    150.     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    151.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    152.     at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    153.     at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    154.     at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    155.     at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    156.     at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    157.     at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    158.     at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    159.     at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:61)
    160. Caused by: groovy.lang.MissingPropertyException: Could not set unknown property 'assetPacks' for extension 'android' of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.
    161.     at org.gradle.internal.metaobject.AbstractDynamicObject.setMissingProperty(AbstractDynamicObject.java:118)
    162.     at org.gradle.internal.metaobject.ConfigureDelegate.setProperty(ConfigureDelegate.java:104)
    163.     at build_3d8f1ks708vczg7c3ons7tyxu$_run_closure2.doCall(D:\Unity\ws\WearDice\Build\launcher\build.gradle:63)
    164.     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    165.     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    166.     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    167.     at org.gradle.util.internal.ClosureBackedAction.execute(ClosureBackedAction.java:72)
    168.     at org.gradle.util.internal.ConfigureUtil.configureTarget(ConfigureUtil.java:155)
    169.     at org.gradle.util.internal.ConfigureUtil.configure(ConfigureUtil.java:106)
    170.     at org.gradle.util.internal.ConfigureUtil$WrappedConfigureAction.execute(ConfigureUtil.java:167)
    171.     at org.gradle.internal.extensibility.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:173)
    172.     at org.gradle.internal.extensibility.ExtensionsStorage.configureExtension(ExtensionsStorage.java:64)
    173.     at org.gradle.internal.extensibility.DefaultConvention.configureExtension(DefaultConvention.java:364)
    174.     at org.gradle.internal.extensibility.DefaultConvention.access$500(DefaultConvention.java:45)
    175.     at org.gradle.internal.extensibility.DefaultConvention$ExtensionsDynamicObject.tryInvokeMethod(DefaultConvention.java:301)
    176.     at org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(CompositeDynamicObject.java:98)
    177.     at org.gradle.internal.extensibility.MixInClosurePropertiesAsMethodsDynamicObject.tryInvokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:34)
    178.     at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.tryInvokeMethod(BasicScript.java:135)
    179.     at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
    180.     at org.gradle.groovy.scripts.BasicScript.invokeMethod(BasicScript.java:84)
    181.     at build_3d8f1ks708vczg7c3ons7tyxu.run(D:\Unity\ws\WearDice\Build\launcher\build.gradle:7)
    182.     at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
    183.     ... 148 more
     
    Last edited: Apr 18, 2024
  4. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,956
    Hard to tell, I assume when you try to build apk from Unity, it works?

    If so, it might be the problem with Android Studio version. You might want to try out older Android Studio version, since it's Unity 2020, try Android Studio 3.x or 4.x
     
    Little_Robot_Guys likes this.
  5. Little_Robot_Guys

    Little_Robot_Guys

    Joined:
    May 7, 2018
    Posts:
    6
    Your assumption is correct. It's worth a shot, I'll try it tonight and post here with results.