这是我在这个非常有用的网站上的第一篇文章!
经过 30 分钟的谷歌搜索并在您输入问题名称时发现了非常有用的自动搜索功能,我想我终于可以注册一个帐户并提出问题了!
好吧,这是我第一次弄脏我的手,我看到直接在我脸上打了一个错误,形式如下:
我了解一些编码概念,但是我仍然非常陌生,我想从本网站上乐于助人的人那里了解导致这种情况发生的原因,谢谢!
clean:
Deleting directory C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\bin
Deleting directory C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\gen
Creating output directories if needed...
Created dir: C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\bin
Created dir: C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\bin\res
Gathering info for AndroidApplication1...
Android SDK Tools Revision 19
Project Target: Google APIs
Vendor: Google Inc.
Platform Version: 2.3.3
API level: 10
------------------
Resolving library dependencies:
No library dependencies.
------------------
API<=15: Adding annotations.jar to the classpath.
------------------
WARNING: No minSdkVersion value set. Application will install on all Android versions.
Created dir: C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\gen
Created dir: C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\bin\classes
----------
Handling aidl files...
No AIDL files to compile.
----------
Handling RenderScript files...
No RenderScript files to compile.
----------
Handling Resources...
Generating resource IDs...
----------
Handling BuildConfig class...
Generating BuildConfig class.
Compiling 3 source files to C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\bin\classes
Converting compiled files and external libraries into C:\Users\User\Documents\NetBeansProjects\AndroidApplication1\bin\classes.dex...
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Error occurred during initialization of VM
Could not reserve enough space for object heap
C:\Program Files\Android\android-sdk\tools\ant\build.xml:818: The following error occurred while executing this line:
C:\Program Files\Android\android-sdk\tools\ant\build.xml:820: The following error occurred while executing this line:
C:\Program Files\Android\android-sdk\tools\ant\build.xml:832: The following error occurred while executing this line:
C:\Program Files\Android\android-sdk\tools\ant\build.xml:278: null returned: 1
BUILD FAILED (total time: 3 seconds)
以及发生错误的行:
C:\Program Files\Android\android-sdk\tools\ant\build.xml
<!-- Converts this project's .class files into .dex files -->
<target name="-dex" depends="-compile, -post-compile, -obfuscate">
818 <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping...">
<!-- only convert to dalvik bytecode is *not* a library -->
820 <do-only-if-not-library elseText="Library project: do not convert bytecode..." >
<!-- special case for instrumented builds: need to use no-locals and need
to pass in the emma jar. -->
<if condition="${build.is.instrumented}">
<then>
<dex-helper nolocals="true">
<external-libs>
<fileset file="${emma.dir}/emma_device.jar" />
</external-libs>
</dex-helper>
</then>
<else>
832 <dex-helper />
</else>
</if>
</do-only-if-not-library>
</do-only-if-manifest-hasCode>
</target>
<!-- Configurable macro, which allows to pass as parameters output directory,
output dex filename and external libraries to dex (optional) -->
<macrodef name="dex-helper">
<element name="external-libs" optional="yes" />
<attribute name="nolocals" default="false" />
<sequential>
<!-- sets the primary input for dex. If a pre-dex task sets it to
something else this has no effect -->
<property name="out.dex.input.absolute.dir" value="${out.classes.absolute.dir}" />
<!-- set the secondary dx input: the project (and library) jar files
If a pre-dex task sets it to something else this has no effect -->
<if>
<condition>
<isreference refid="out.dex.jar.input.ref" />
</condition>
<else>
<path id="out.dex.jar.input.ref">
<path refid="project.libraries.jars" />
</path>
</else>
</if>
<dex executable="${dx}"
output="${intermediate.dex.file}"
nolocals="@{nolocals}"
278 verbose="${verbose}">
<path path="${out.dex.input.absolute.dir}"/>
<path refid="out.dex.jar.input.ref" />
<external-libs />
</dex>
</sequential>
</macrodef>