gpt4 book ai didi

android - 构建应用程序时出现 BufferOverflowException

转载 作者:IT王子 更新时间:2023-10-28 23:33:11 25 4
gpt4 key购买 nike

每次我想运行我的 Android 应用程序时都会出错:

[2013-11-02 13:05:36 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
[2013-11-02 13:05:36 - **********] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

我用谷歌搜索了它,但没有找到任何东西。我已将 permsize 设置为 512m、Xms1024m 和 Xmx2048m。我正在使用 v22.0.0-675183。

.日志:

!ENTRY com.android.ide.eclipse.adt 4 0 2013-11-02 13:05:36.597
!MESSAGE Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
!STACK 0
java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Unknown Source)
at java.nio.HeapByteBuffer.putShort(Unknown Source)
at com.android.dex.Dex$Section.writeShort(Dex.java:818)
at com.android.dex.Dex$Section.writeTypeList(Dex.java:870)
at com.android.dx.merge.DexMerger$3.write(DexMerger.java:437)
at com.android.dx.merge.DexMerger$3.write(DexMerger.java:423)
at com.android.dx.merge.DexMerger$IdMerger.mergeUnsorted(DexMerger.java:317)
at com.android.dx.merge.DexMerger.mergeTypeLists(DexMerger.java:423)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:163)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:187)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.DexWrapper.run(DexWrapper.java:187)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.executeDx(BuildHelper.java:780)
at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(PostCompilerBuilder.java:593)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:726)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:321)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:396)
at org.eclipse.core.internal.resources.Project$1.run(Project.java:618)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
at org.eclipse.core.internal.resources.Project.internalBuild(Project.java:597)
at org.eclipse.core.internal.resources.Project.build(Project.java:124)
at com.android.ide.eclipse.adt.internal.project.ProjectHelper.doFullIncrementalDebugBuild(ProjectHelper.java:1057)
at com.android.ide.eclipse.adt.internal.launch.LaunchConfigDelegate.launch(LaunchConfigDelegate.java:147)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:855)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:704)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1047)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1251)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

最佳答案

我能够通过添加这个额外的行来构建我的问题项目:

sdk.buildtools=18.1.1

...到我的 project.properties 文件,该文件位于项目文件夹的根目录中。所有其他方法对我来说似乎都失败了。

关于android - 构建应用程序时出现 BufferOverflowException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19741758/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com