Execution failed for task app:transformClassesWithDexBuilderForDebug in Processing

huangapple go评论71阅读模式
英文:

Execution failed for task app:transformClassesWithDexBuilderForDebug in Processing

问题

我正在使用Processing进行编码,在一个问题上卡了好几个小时,经过多个小时的调试,我已经放弃了,因为我需要帮助。错误信息如下:

> 构建失败:遇到异常。
> * 出了什么问题:
> 执行任务 ':app:transformClassesWithDexBuilderForDebug' 失败。
> com.android.build.api.transform.TransformException:
com.android.builder.dexing.DexArchiveBuilderException:
com.android.builder.dexing.DexArchiveBuilderException:
无法处理 C:\Users\ >
myUserName\AppData\Local\Temp\android5429541723127013969sketch\app\build\intermediates\transforms\desugar\debug\1.jar

我尝试过的:

最常推荐的是使用
> ./gradelw clean

然而,这导致了许多新的问题,命令仍然不起作用,并且卡在

> 无法通知项目评估监听器错误

我还没有找到解决方法。

删除Android文件夹似乎没有解决问题,问题仍然存在,而且没有创建新的android文件夹

重新安装Android库也没有解决问题。

在https://discourse.processing.org/t/execution-failed-for-task-app/24563 上也发布了同样的问题。

英文:

I am using Processing to code and have been stuck on a problem for hours now, and after many hours of debugging I have given up because I need help. The error reads:

> FAILURE: Build failed with an exception.
> * What went wrong:
> Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> com.android.build.api.transform.TransformException:
com.android.builder.dexing.DexArchiveBuilderException:
com.android.builder.dexing.DexArchiveBuilderException: Failed to process C:\Users\ >
myUserName\AppData\Local\Temp\android5429541723127013969sketch\app\build\intermediates\transforms\desugar\debug\1.jar

What I have tried:

What was recommended most was using
> ./gradelw clean

However this meant a whole bunch of new problems with the command still not working and getting stuck on

> Failed to notify project evaluation listener error

Which I have not found a solution for.

Deleting the Android folder did not seem to resolve the issue, with it persisting and not making a new android folder

Reinstalling the Android Library which did also not resolve the problem

crossPosted at https://discourse.processing.org/t/execution-failed-for-task-app/24563

答案1

得分: 0

我曾在相当一段时间前遇到过同样的问题。原因之一可能是您在处理草图中导入的库在安卓上不受支持。
尝试删除导入语句,以找出可能导致错误的库。

如果所有库都受到安卓支持,那么请尝试将库的主文件夹复制到草图的数据文件夹中。您可以在存储所有草图的目录内找到“libraries”文件夹,其中包含各种库的文件夹。

还可以尝试通过在处理IDE中点击Android >> SDK Updater来更新您的SDK。

另一个解决方案是使用SDK管理器进行更新。如果您使用的是Windows,通常可以在C:\users\username\appdata\local\android\sdk\tools\bin找到SDK管理器,在命令提示符中输入sdkmanager --update进行更新。

英文:

I was facing the same problem quite a while ago. One of the reasons can be that the libraries that you may be importing in your processing sketch is not supported on android.
Try removing the import statements to find out which may be causing the error.

If all the libraries are supported by android, then try copying the main folder of the library in the data folder of your sketch. You can find the folder for the various libraries in the "libraries" folder which will be located inside the directory where all your sketches are stored.

Also try updating your sdk by clicking Android >> SDK Updater in your processing IDE.

One other solution could be updating using the sdk manager. If you are in windows, you can generally find the sdk manager in C:\users\username\appdata\local\android\sdk\tools\bin open this in cmd and then type sdkmanager --update to update.

huangapple
  • 本文由 发表于 2020年10月13日 05:13:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/64325425.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定