Search code examples
androidsdkandroid-source

Android SDK Build Error: Gap between image and main spaces


Android Lollipop 5.0.1

Kernel Version: 3.10.53

i.MX6 Dual Core

Hello,

I have made some changes within the system server, and have built an API for use with a customer's app, but when I try and build the SDK to allow me to test the changed API in Android Studio, it fails and I get the error seen in the title (debug below).


Here is my process:

  1. Made my service and respective manager.

  2. Ran "make update-api"

  3. Followed the directions below:

"simply build the SDK using:

$ cd ~/my-android-git

$ . build/envsetup.sh

$ lunch sdk-eng

$ make sdk "


I received the following error text: (see attached .txt for full debug)

dex2oatd E 11001 11001 art/runtime/gc/heap.cc:421] 0x56dde768

dex2oatd F 11001 11001 art/runtime/gc/heap.cc:422] There's a gap between the image space and the main space

dex2oatd F 11001 11001 art/runtime/runtime.cc:284] Runtime aborting...

dex2oatd F 11001 11001 art/runtime/runtime.cc:284] (Aborting thread was not attached to runtime!)


I have tried several different "fixes" including:

Editing build/core/dex_preopt_libart.mk to change the virtual address space utilized and changing device/.../BoardConfigCommon.mk to change the partition size. None of these have been met with success.

What do I need to do to get this sdk to build?

Thanks for your help


Solution

  • I looked into this a bit more:

    I downloaded the source code from google (Lollipop 5.0.1) and retried the SDK, which worked well. The problem lies in the Freescale / NXP patches for Lollipop.