Android Constraint Layout


(Benjamin Keffer) #21

Hi marc,

I have the same problem as Bee Jay. I referenced the constraint-layout (manually) as well as the appcompat and compiled the project. The app will crash with the above exception.
I guess there is any problem with Gradle in general (maybe some charset issues). Fire says the following:

If you like you can TV on my Mac :wink:

(marc hoffman) #22

Can one of you send me your reproducing project with the reference? That said, i prolly won’t have time to look at this until next week, as i’m at WWDC this week.

Benjamin, are you using the latest beta build, or 2151 RTM? the %2D encodings look like a regression related to something infixed for the last beta, and might explain why the reference doesn’t resolve for you. (and of course if it doesn’t resolve, it wont be linked in and its “normal” that the app will then crash on the missing class.

if your project still crashes with the reference resolved ok, then we have a second bug.


(Benjamin Keffer) #23

nice, I truly envy you! :slight_smile:

Yes I’m using the latest build 2153

So I guess that’s it ^^ (42.3 KB)

(marc hoffman) #24

reproduced, will debug later today. thanx!

(marc hoffman) #25

Forgot to reply, but this is fixed for the next beta, FYI

(Benjamin Keffer) #26

With the latest update I can’t add any gradle reference from the reference window :-/

And including the constraint-reference manually will still through the “could not be resolved” error.

(marc hoffman) #27

Confirmed, the list is empty — does that match what you’re seeing? probably a regression from some abstractions we’ve been doing for Water. will check and fix for the next build

hmm, sure you added it correctly? Does it resolve after project reload/Fire restart? how it was added should make no difference.

(marc hoffman) #28

actually, that wasn’t it. but fixed.

(Benjamin Keffer) #29

I think so.
After relaunching the error still appears.

(marc hoffman) #30

I get “Gradle packages Version * not found in any repositories” for <GradleReference Include="*" />. Which seems fair enough, given i cant actually find this package in any row the repositories, and gradle itself fails too resolve it, too. You sure thats the right name?

(Benjamin Keffer) #31

Hm I don’t know. But the gradle import still doesn’t work (with latest beta .2159). I get the error “reference could not resolved” when adding any reference.

(marc hoffman) #32

RIght, as do i. But the package actually doesn’t seem to exist, as far as I can tell, so the error is correct :wink:

(Benjamin Keffer) #33

But every gradle-reference throws this error :eyes:

(marc hoffman) #34

Hmm, not for me.

(Benjamin Keffer) #35

As soon as you reference remoting sdk gradle won’t work anymore

(marc hoffman) #36

hmm can you send me a test case? i’ll” have a look first thing tomorrow.

(marc hoffman) #37

Oh, and can you try using a real version number instead of *. I noticed the other day that MSBuild seems to drop any references that have *, before they even get to out tasks. I’ll be adding a fix for that this coming week as well.

(Tyler Wilson) #38

I was able to get this working in my Android Silver project. As the last message says, use an explicit version number, like so:

<GradleReference Include="" />

I also noticed that the constraint layout jars are not put in a standard search location in the sdk folder. My guess is that Fire is not scanning the actual folder it is in. On my macOS system, it is laid out like so:

What I did was copy/paste from the /extras/m2repository/com/android/support/constraint into /extras/android/m2repository/com/android/support and then everything worked for (and as a bonus, it shows up in the Gradle Reference list in the Fire UI).

  • Tyler

(marc hoffman) #39

Curious. there’s two m2repositories folders? i’ll check the logic again. Note that current;y, only Fire uses our own logic for resolving these, in the IDE. the build still uses Gradle, so it should do the right thing either way (but you undo need tombs the exact version; xbuild skips references with *, it turns out…


(marc hoffman) #40

Odd #2, i don have a /extras/m2reposutory. in only have /extras/android and /extras/google. did you install any additional packages in SDK Manager to get those? i also don’t have /extras/intel.