# Setting android reference absolute path in projectfile produces errors

**URL:** https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869
**Category:** EBuild
**Created:** [October 1, 2024, 8:24am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869 "2024-10-01T08:24:43Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [October 1, 2024, 8:24am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/1 "2024-10-01T08:24:43Z")

</div>

Using the Android SDK template, the elements file contains (omitting “Cooper”)

```auto
  <ItemGroup>
    <Reference Include="android" />
  </ItemGroup>

```

Now EBild says:

Reference ‘android’ was resolved to ‘d:\Flucke\AndroidNew\platforms\android-34\android.jar’ for target ‘Cooper-Android’.

If i now replace the “android” reference with the resolved location like so:

```auto
  <ItemGroup>
    <Reference Include="d:\Flucke\AndroidNew\platforms\android-34\android.jar" />
  </ItemGroup>

```

EBuild says:

Reference ‘d:\Flucke\AndroidNew\platforms\android-34\android’ was resolved to ‘d:\Flucke\AndroidNew\platforms\android-34\android.jar’ via absolute path for target ‘Cooper-Android’.

Should be the same, right ? But the project doesn’t compile anymore ☹

[org.me.androidapplication 1.bugreport.txt](https://talk.remobjects.com/uploads/short-url/vnDbYtvs3AkIk31bq9tsOE7zJY0.txt) (13.0 KB)

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [October 1, 2024, 8:29am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/2 "2024-10-01T08:29:49Z")

</div>

Sorry, the web app removed the intresting projectfile parts.

First Part (replaced the greater then signs etc…)

_ItemGroup_  
_Reference Include=“android” /_  
_/ItemGroup_

Second Part:  
_ItemGroup_  
_Reference Include=“d:\Flucke\AndroidNew\platforms\android-34\android.jar” /_  
_/ItemGroup_

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 5, 2024, 4:22pm UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/3 "2024-10-05T16:22:12Z")

</div>

> [@Andreas\_Flucke](#):
>
> Should be the same, right ? But the project doesn’t compile anymore ☹

You have aapt2 errors processing reousrce files. These will be unrelated to that android.jar file you reference. THAT said, _why_ do you hardcode the reference to the android.jar file, and are yu sure its the right one?

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [October 7, 2024, 7:02am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/4 "2024-10-07T07:02:18Z")

</div>

I do so with all my references… and yes, im shure it’s the right one.  
Using Water exclusively, this wouldn’t matter, but using EBuild alone (or in my case in my App) this matters…

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 7, 2024, 11:18am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/5 "2024-10-07T11:18:43Z")

</div>

> [@Andreas\_Flucke](#):
>
> I do so with all my references…

Okay, but why? I think that’s a very bad idea, and you shouldn’t do (nor need to do) it.

Ok, so just to be clear, `aapt2` fails when the an absolute hint path is provided to android.jar`, but does nit fail, when the _exact same_ android.jar gets found automatically?

TBH, that makes sense and should make no difference.

IN any case, I suggest leaving the hint path off `android.jar`, as that’s bow it’s supposed to be. Especially if adding it does break things for you.

> [@Andreas\_Flucke](#):
>
> Using Water exclusively, this wouldn’t matter, but using EBuild alone (or in my case in my App) this matters…

Can you elaborate what yo mean Water vs EBuild alone? the build should be exactly th same, whether you trigger hot inside Water or form the command line. Can yo compare the arguments Water passes to EBuild vs what you use manually, to see what could be. taking a difference, if any?

thanks,  
marc

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [October 9, 2024, 6:13am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/6 "2024-10-09T06:13:00Z")

</div>

Hi Marc,  
i only ment that Water uses/cares of taking the android.jar file without path.  
I’ve changed this on my side, so this is kind of ‘would be nice’ now.

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [October 9, 2024, 6:23am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/7 "2024-10-09T06:23:57Z")

</div>

Btw: i cannot get an Android App to install/run either on the emulator nor on the  
device. What do i miss ?  
The crossbox dropdown shows me the (virtual) devices, but ‘run’ remains grayed out.  
The latest SDK doesn’t produce apks any more, and when setting this to true in the project options it gives an error.  
Manually using the bundetool produces apks without (debug-) certificate, so  
i cannot install/run them manually.

Should i open a new thread or what im doing wrong here ?  
(Cmdline tools version 13, build tools version 35)

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [October 9, 2024, 11:51am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/8 "2024-10-09T11:51:32Z")

</div>

> [@Andreas\_Flucke](#):
>
> The crossbox dropdown shows me the (virtual) devices, but ‘run’ remains grayed out.  
> The latest SDK doesn’t produce apks any more, and when setting this to true in the project options it gives an error.

That is the issue, pas per the other thread.

It used to be, .aab was the new format to build for deployment, but debugging still required .apks. That’s the last state we support currently. At some point after, Google apparently removed the ability to create .apks, so I _assume_ that debugging with .aabs is supported now by the SDK (but not by us, yet). in the preview thread where we discussed that, I logged a ticket, and one of my colleagues is looking into supporting this scenario in a future update, hopefully soon.

yours,  
marc

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [October 10, 2024, 6:37am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/9 "2024-10-10T06:37:52Z")

</div>

> [@mh](#):
>
> I logged a ticket, and one of my colleagues is looking into supporting this scenario in a future update, hopefully soon.

Sounds good, thanky you 🙂

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [November 27, 2024, 9:39am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/10 "2024-11-27T09:39:10Z")

</div>

Hi,

i found this in the latest changelog:

“Android: support for building .apks files (wip).”

but cannot find any changes in the bahavior.  
Can you please give some further information how to achieve this ?

Thanks

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [November 27, 2024, 3:02pm UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/11 "2024-11-27T15:02:51Z")

</div>

> [@Andreas\_Flucke](#):
>
> i found this in the latest changelog:
> 
> “Android: support for building .apks files (wip).”
> 
> but cannot find any changes in the bahavior.  
> Can you please give some further information how to achieve this ?

This is not fully working in last weeks build, but should for the upcoming 2957, on Friday.

Essentially, theres a new project setting, GenerateAPKs (note the S!); if on, the build will generate a `.apks` file from the `.aab`, and use that to deploy to the device or emulator for debugging. You can turn off the GenerateApk setting (I’ll probably remove it in the future, as latest SDKs cant do this anymore, ayways; and it now defaults to off).

I’m still undecided on whether I’ll have GenerateAPKs ON by default for Friday, or whether to just set it to ON for the Debu config, in the templates; in the after case, you manually have to turn it on for existing projects.

(w/o the option set, deployment will continue to fail with

> ~\> Debugging with .aab files is not supported yet. Please enable building an .apk(s) file.

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [November 28, 2024, 6:58am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/12 "2024-11-28T06:58:54Z")

</div>

Thanks

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [December 9, 2024, 10:34am UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/13 "2024-12-09T10:34:53Z")

</div>

Cannot get it to work (.2959). What do i miss ?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 13, 2024, 3:57pm UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/14 "2024-12-13T15:57:34Z")

</div>

> [@Andreas\_Flucke](#):
>
> Cannot get it to work (.2959). What do i miss ?

You tell me. What fails?

---

<div class="post-metadata">

### Author: ![Andreas\_Flucke](https://talk.remobjects.com/letter_avatar_proxy/v4/letter/a/e495f1/32.png) [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)
#### Post date: [December 16, 2024, 12:34pm UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/15 "2024-12-16T12:34:52Z")

</div>

Can you supply/link to a working example ?

---

<div class="post-metadata">

### Author: ![mh](https://talk.remobjects.com/user_avatar/talk.remobjects.com/mh/32/18050_2.png) [@mh](https://talk.remobjects.com/u/mh)
#### Post date: [December 16, 2024, 7:37pm UTC](https://talk.remobjects.com/t/setting-android-reference-absolute-path-in-projectfile-produces-errors/30869/16 "2024-12-16T19:37:46Z")

</div>

For what, exactly?

A new Android app from template builds, deploys and runs fine, here for me.
