Open andersonbadari opened 8 years ago
nevermind. Solved.
To anyone who s getting this same error:
change this line to the package that you created the TintableImageView class...
<com.ogaclejapan.smarttablayout.demo.TintableImageView
to, for example
<com.myproject.mypackage.TintableImageView
from
<?xml version="1.0" encoding="utf-8"?>
<com.ogaclejapan.smarttablayout.demo.TintableImageView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/lib/com.mypackage"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="?attr/selectableItemBackground"
android:padding="6dp"
android:scaleType="center"
app:tint="@color/custom_tab_icon"
/>
Just implemented custom tab icons and I am getting the following error:
FATAL EXCEPTION: main Process: com.mypackage, PID: 23770 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mypackage/com.mypackage.views.activities.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class com.ogaclejapan.smarttablayout.demo.TintableImageView
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class com.ogaclejapan.smarttablayout.demo.TintableImageView
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.ogaclejapan.smarttablayout.demo.TintableImageView" on path: DexPathList[[zip file "/data/app/com.mypackage-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
My code:
SetupTab.class:
I had to chage the xmlns to "http://schemas.android.com/apk/lib/com.mypackage" because "http://schemas.android.com/apk/res-auto" was giving me "Error:(2) No resource identifier found for attribute 'tint' in package 'com.mypackage'" on apk compilling....
MainActivity.class: