xamarin/SignaturePad

Android: cannot find SignaturePadView during layout inflate

tanis2000 opened this issue · 0 comments

Description

When compiling with AAPT2 enabled, Android cannot find SignaturePadView at runtime

Code

You can test it with the Sample.Android from this very same repo.

Expected Behavior

The SignaturePadView should be shown.

Actual Behavior

It throws the following exception when inflating the layout:

{Android.Views.InflateException: Binary XML file line #1: Error inflating class Xamarin.Controls.SignaturePadView ---> Java.Lang.ClassNotFoundException: Didn't find class "Xamarin.Controls.SignaturePadView" on path: DexPathList[[zip file "/data/app/com.comac.app-fC7dL3nb525DZSzsXcw7uQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.comac.app-fC7dL3nb525DZSzsXcw7uQ==/lib/x86, /data/app/com.comac.app-fC7dL3nb525DZSzsXcw7uQ==/base.apk!/lib/x86, /system/lib]]
   --- End of inner exception stack trace ---
  --- End of managed Android.Views.InflateException stack trace ---
android.view.InflateException: Binary XML file line #1: Error inflating class Xamarin.Controls.SignaturePadView
Caused by: java.lang.ClassNotFoundException: Didn't find class "Xamarin.Controls.SignaturePadView" on path: DexPathList[[zip file "/data/app/com.comac.app-fC7dL3nb525DZSzsXcw7uQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.comac.app-fC7dL3nb525DZSzsXcw7uQ==/lib/x86, /data/app/com.comac.app-fC7dL3nb525DZSzsXcw7uQ==/base.apk!/lib/x86, /system/lib]]
	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
	at android.view.LayoutInflater.createView(LayoutInflater.java:606)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:863)
	at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
	at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:420)
	at android.app.Activity.setContentView(Activity.java:2771)
	at md5846cf5fe97268911de4548f3e0228476.SignatureActivity.n_onCreate(Native Method)
	at md5846cf5fe97268911de4548f3e0228476.SignatureActivity.onCreate(SignatureActivity.java:29)
	at android.app.Activity.performCreate(Activity.java:7136)
	at android.app.Activity.performCreate(Activity.java:7127)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6669)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
}

Basic Information

I don't know if this an issue of this project or a more generic AAPT2/Xamarin issue