so I recently migrated to gradle now my custom view attributes return null
my project looks like this
--custom_icon_view // library that holds the custom view wi
You will get this error when you have statically declared your package name as a namespace (e.g xmlns:iconview="http://schemas.android.com/apk/lib/be.webelite.iconview" in your case) in a layout file and try building the project with Lint on. Check the Android Gradle Lint checks:
In Gradle projects, the actual package used in the final APK can vary; for example,you can add a .debug package suffix in one version and not the other. Therefore, you should not hardcode the application package in the resource; instead, use the special namespace http://schemas.android.com/apk/res-auto which will cause the tools to figure out the right namespace for the resource regardless of the actual package used during the build.