googlearchive / android-instant-apps

Migrated:
https://github.com/android/app-bundle
Apache License 2.0
846 stars 277 forks source link

Instant app doesn't build: Invalid dimen #2

Closed Dawars closed 7 years ago

Dawars commented 7 years ago

The assembleDebug task fails with the following error message when I try to run the instant module, the installed module starts fine. I tried creating a new project as well as using the sample project here but both fail.

instant_app

https://pastebin.com/r1LfsLTR

I have Ubuntu 16.04 and just installed Android Studio 3 with the latest tools.

keyboardsurfer commented 7 years ago

I couldn't reproduce the issue on either of the projects. Could you try ./gradlew clean assemble on the command line and see if the problem persists?

Dawars commented 7 years ago

I get the same error message. I tried on 2 separate Ubuntu machines.

adamkoch commented 7 years ago

Are you on Ubuntu as well? Can you send the actual dimen value inside the merged values.xml?

Dawars commented 7 years ago

Here is the whole values.xml: https://pastebin.com/vt0WSJVv

line 244:<item format="float" name="abc_disabled_alpha_material_dark" type="dimen">0.30</item> line 282:<item format="float" name="disabled_alpha_material_dark" type="dimen">0.30</item> line 285:<item format="float" name="highlight_alpha_material_colored" type="dimen">0.26</item> etc

It's the lines in that format having no unit.

These are fine:

<item name="abc_dialog_fixed_height_minor" type="dimen">100%</item> <item name="abc_dialog_fixed_width_major" type="dimen">320dp</item>

kelvinc1024 commented 7 years ago

screenshot from 2017-05-19 12-20-40 Same here, also tried in ubuntu 16.04 Android Studio 3.0 with latest tools both modules are failed

friedger commented 7 years ago

Same for the codelab

keyboardsurfer commented 7 years ago

Thanks for your reports. We're looking into the source of the issue.

saturov commented 7 years ago

Same here on Ubuntu 16.04. It started to reproduce since I moved to Android Studio 3.0 from 2.3 with my Instant App project.

keyboardsurfer commented 7 years ago

The workaround is to switch your development machine to a locale which uses "." as a decimal mark. To track the fix of this issue star this issue from the Google issuetracker.

Dawars commented 7 years ago

It has to do with the regional formats, not the local. It can be changed the following way: image

LeadManPL commented 7 years ago

AS 3.0 Beta 2 still has this issue. Changing regional settings is rather workaround, than a solution...

keyboardsurfer commented 7 years ago

We are aware of this issue and are working on a solution. There's a link to a tracked issue in my comment above.

ktiusks commented 7 years ago

Hello, How is it resolved for debian 9? Thanks.

keyboardsurfer commented 7 years ago

Hi @ktiusks, have you tried the solutions provided both in this thread and in the issuetracker link above?

LeadManPL commented 7 years ago

Just a notification, Android Studio 3.0 Beta 6 still has this issue. Changing regional settings workaround, still saves the day ;P

jcuypers commented 7 years ago

Tying android studio 3.0.0 beta 6 for some reason it doesnt seem to work for me. still invalid dimen error for all decimal 0.xx values. current locale is correctly set:

`jcuypers@nostradamus:/usr/local/android-studio-preview/bin$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_US.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8
LC_TELEPHONE=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_ALL=

`

LeadManPL commented 7 years ago

@jcuypers : try out this one: https://stackoverflow.com/a/44304075

jcuypers commented 7 years ago

sorry for the late reply. It seems that Beta 7 has solved the issue. I dont know whether this has worked because of my previous changes already or Its solely because of the update. If you have issues like this I would recommended to upgrade to the latest and to tray again. thanks

keyboardsurfer commented 7 years ago

Closing this issue. Please continue discussion on the Google Issue Tracker if necessary.