Solved: ButterKnife 10.1.0 with new Support Library "AndroidX"
HTML-код
- Опубликовано: 8 фев 2025
- Update: before watching this video, (the solution is), When starting new project and while running the project wizard choose check box for "use AndroidX artifacts" to use the new Support library or follow the video steps for existing projects..
-------------------------------------------
This video is about:
1. using ButterKnife 10.1.0 library in Android Studio 3.3.2
2. using the new Support library "AndroidX" in Android Studio.
This video shows simple steps to solve the error of adding ButterKnife 10.1.0 in app build.gradle, it gives an error when trying to run the project.
Follow these steps to solve this problem.
--------------------------
ما الذي يعرضه هذا الفيديو؟
يعرض هذا الفيديو خطوات عملية لحل مشكلة استخدام مكتبة
ButterKnife 10.1.0
مع استخدام النسخة الجديدة من مكتبة الدعم الرسمية الملحقة بأندرويد
Support Library
والتي أصبح لها اسم جديد تحت اسم حزمة جديد
AndroidX
---------------------------------
Steps:
1. google changed the package name of support libraries to AndroidX
for mapping names (old to new) check the following link.
developer.andr...
2. use Java compiler 1.8 by adding the following lines in app build.gralde
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
3. import the new package(s) in java files.
4. modify the xml layout to new package name when required and rebuild.
5. use butterknife zelezny addon to generate ButterKnife binding code.
6. run now it should work !!! ;)