Android Constraint Layout

android
fire

(marc hoffman) #41

i’ve fixed EBuild (and thus Fire’s IDE resolving) to check for ./m2repository, and also check any subfolders of extras for a ./m2repository. This will be in tomorrow’s beta and in 9.2


(Tyler Wilson) #42

This is my whole extras dir: the intel is for the HAXM clearly. When I get 9.2 or a beta I will remove the extra constraints copy and re-test.

Thanks,
Tyler

Now I am going to donate my $ to get access to the beta…


(Tyler Wilson) #43

One more note: Google is moving to using a maven repo to pick up packages directly from the net. So in theory you do not need to download these repos locally anymore. So I expect you will need to update your EBuild tool to do the same at some point…

See here

  • Tyler

(marc hoffman) #44

Yeah, EBuild already checks the two standard remote repos, and it’ll be configurable to chnage/add more. (the browser/picker iirc current;y does not show stuff from remote repos yet; i’ll see fif i canstill fix that for 9.2 (we’re prolly locked down and i dont wanna open any new construction sites ;), else in a beta shortly after.


(marc hoffman) #45

FWIW, io still can’t see to find com.android.support.constraint:constraint-layout anywhere. its not on my local disk, and its not found in any of the standard repos

> Could not find com.android.support.constraint:constraint-layout:1.0.2.
  Searched in the following locations:
      file:/Users/mh/Library/Android/sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.pom
      file:/Users/mh/Library/Android/sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.jar
      file:/Users/mh/Library/Android/sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.pom
      file:/Users/mh/Library/Android/sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.jar
      https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.pom
      https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.jar
      https://repo1.maven.org/maven2/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.pom
      https://repo1.maven.org/maven2/com/android/support/constraint/constraint-layout/1.0.2/constraint-layout-1.0.2.jar

what do you install to get it?


(marc hoffman) #46

Ah, found it:


(Tyler Wilson) #47

Okay, it has been a while since I trie Fire for Android, and I am getting this InflateException with the latest Fire (10.0.0.2293).

I got the latest versions installed via the newer settings in the ebuild file, like so:

<GradleRepository Include="https://maven.google.com/" />
<GradleReference Include="com.android.support.constraint:constraint-layout:1.1.2">
  <Private>True</Private>
</GradleReference>

But when I try to run the app, I get the dreaded:

!> Exception of type android.view.InflateException on thread 0001 ()
!> Message: Binary XML file line #2: Error inflating class android.support.constraint.ConstraintLayout

The old tricks do not work, since it is pulling directly from the Google Maven area.

I did an ‘Edit User Interface Files in Android Studio’ and noted the following:

  • The top-level repositories sections do not contain the google() reference, which I think it should (or at least add the same GradleRepository data we added in the project file
  • The gradle plugin version referenced is kind of old: 2.3.0 versus the latest available 3.1.3
  • The app build.gradle is using the latest version of the buildTools and targetSdk I have installed, which I am unsure how to change. I have the latest API 28 beta SDK installed, and it should likely be using the latest release v27.
  • Looking at the ebuild log, it appears to be using aapt v1 versus what should likely be used is aapt2.

I will go back to a non-Constraint Layout just to test things, but it would be great if it worked.

Thank you,
Tyler


(marc hoffman) #48

Does this help? https://stackoverflow.com/questions/42501868/error-inflating-class-constraintlayout


(Tyler Wilson) #49

I am using the full path for the layout.

<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">```

This is directly from a working Android Studio project, so I suspect it is more of a toolchain issue. I can zip up my project and send it to you if you would be interested.

Thank you, Tyler

(Tyler Wilson) #50

Also note I have to change this line like so:

xmlns:app="http://schemas.android.com/apk/lib-auto"

in order for it to recognize the custom keys of ConstraintLayout. Likely due to the aapt vs aapt2 ?


(marc hoffman) #51

id appreciate that.


(DonaldShimoda) #52

Is fixed or any additional steps in actual Fire release?