azhengyongqin / cordova-plugin-android-update

App updater for Cordova/PhoneGap
MIT License
25 stars 13 forks source link

error: attribute layout_constraintBottom_toBottomOf (aka com.yjr.jinguantong:layout_constraintBottom_toBottomOf) not found. #1

Open liqiang1001 opened 5 years ago

liqiang1001 commented 5 years ago

D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintBottom_toBottomOf (aka com.yjr.jinguantong:layout_constraintBottom_toBottomOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintEnd_toEndOf (aka com.yjr.jinguantong:layout_constraintEnd_toEndOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintHorizontal_bias (aka com.yjr.jinguantong:layout_constraintHorizontal_bias) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintStart_toEndOf (aka com.yjr.jinguantong:layout_constraintStart_toEndOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintTop_toTopOf (aka com.yjr.jinguantong:layout_constraintTop_toTopOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:39: error: attribute layout_constraintEnd_toEndOf (aka com.yjr.jinguantong:layout_constraintEnd_toEndOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:39: error: attribute layout_constraintStart_toStartOf (aka com.yjr.jinguantong:layout_constraintStart_toStartOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:39: error: attribute layout_constraintTop_toBottomOf (aka com.yjr.jinguantong:layout_constraintTop_toBottomOf) not found. error: failed linking file resources.

MrLrx commented 5 years ago

@azhengyongqin Packing Error Reporting D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintBottom_toBottomOf (aka com.yjr.jinguantong:layout_constraintBottom_toBottomOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintEnd_toEndOf (aka com.yjr.jinguantong:layout_constraintEnd_toEndOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintHorizontal_bias (aka com.yjr.jinguantong:layout_constraintHorizontal_bias) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintStart_toEndOf (aka com.yjr.jinguantong:layout_constraintStart_toEndOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:26: error: attribute layout_constraintTop_toTopOf (aka com.yjr.jinguantong:layout_constraintTop_toTopOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:39: error: attribute layout_constraintEnd_toEndOf (aka com.yjr.jinguantong:layout_constraintEnd_toEndOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:39: error: attribute layout_constraintStart_toStartOf (aka com.yjr.jinguantong:layout_constraintStart_toStartOf) not found. D:\work\spot-check-app\platforms\android\app\src\main\res\layout\layout_dialog_update.xml:39: error: attribute layout_constraintTop_toBottomOf (aka com.yjr.jinguantong:layout_constraintTop_toBottomOf) not found. error: failed linking file resources.

Alvinpro commented 4 years ago

CAUSED BY: missing com.android.support.constraint:constraint-layout:1.1.3 Solution:

  1. in cordova project: ./platforms/android/project.properties add below cordova.system.library.2=com.android.support.constraint:constraint-layout:1.1.3
  2. Use Android Studio Open the cordova project, in Project Structure/app add com.android.support.constraint:constraint-layout:1.1.3 click ok.

then your project should build successfully by Android Studio Build or cordova build android!

ourtownamerica commented 10 months ago

Took me a minute to figure out the second part of @Alvinpro's solution above so, to elaborate...

  1. I already had a cordova.system.library.2 proerty in my project.properties file, so I needed to increment the '2' ta '3', eg: cordova.system.library.3=com.android.support.constraint:constraint-layout:1.1.3.
  2. In Android Studio, navigate to File-> Project Structure... in the left pane, click Dependencies, then in the Modules pane, click app, then in the Declared Dependencies pane, click the plus sign at the top (+), and select Library Dependency. In the search bar, paste com.android.support.constraint:constraint-layout:1.1.3 and click Search. Select the library and click Ok to add it. Then click OK to close the Project Structure window.

Project builds now!