728x90

SMSCpnvey 가 집에있는 베가넘버6 에서도 에러가 발생되어

컴퓨터와 연결후 디버깅 해보았다..

그러니 에러가 아래 처럼 나타났다.

Android.Views.InflateException: Binary XML file line #1: Error inflating class Toolbar

정확히 알수 없어 exception 으로 빠지게하여 자세히 보니


{Android.Views.InflateException: Binary XML file line #1: Error inflating class Toolbar ---> Java.Lang.ClassNotFoundException: Didn't find class "android.view.Toolbar" on path: DexPathList[[zip file "/data/app/kr.kjun.SMSConvey-2.apk"],nativeLibraryDirectories=[/data/app-lib/kr.kjun.SMSConvey-2, /vendor/lib, /system/lib]]
   --- End of inner exception stack trace ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0
  at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00089] in <bd30a18775d94dc8b6263aecd1ca9077>:0
  at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0005d] in <bd30a18775d94dc8b6263aecd1ca9077>:0
  at Android.App.Activity.SetContentView (System.Int32 layoutResID) [0x00022] in <9ab9faae1b4b4f0da28e7c4ac61e2c78>:0
  at SMSConvey.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00011] in D:\[01]Source\K\K\SMSConvey\MainActivity.cs:40
  --- End of managed Android.Views.InflateException stack trace ---
android.view.InflateException: Binary XML file line #1: Error inflating class Toolbar
 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707)
 at android.view.LayoutInflater.parseInclude(LayoutInflater.java:816)
 at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
 at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
 at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:328)
 at android.app.Activity.setContentView(Activity.java:1934)
 at md5328597d03b579986891d158e9e4b98f4.MainActivity.n_onCreate(Native Method)
 at md5328597d03b579986891d158e9e4b98f4.MainActivity.onCreate(MainActivity.java:33)
 at android.app.Activity.performCreate(Activity.java:5249)
 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1092)
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2189)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2275)
 at android.app.ActivityThread.access$800(ActivityThread.java:142)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1220)
 at android.os.Handler.dispatchMessage(Handler.java:102)
 at android.os.Looper.loop(Looper.java:136)
 at android.app.ActivityThread.main(ActivityThread.java:5091)
 at java.lang.reflect.Method.invokeNative(Native Method)
 at java.lang.reflect.Method.invoke(Method.java:515)
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
 at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.Toolbar" on path: DexPathList[[zip file "/data/app/kr.kjun.SMSConvey-2.apk"],nativeLibraryDirectories=[/data/app-lib/kr.kjun.SMSConvey-2, /vendor/lib, /system/lib]]
 at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
 at android.view.LayoutInflater.createView(LayoutInflater.java:559)
 at android.view.LayoutInflater.onCreateView(LayoutInflater.java:652)
 at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
 at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
 ... 23 more
}

위처럼 에러가 ...

중요한건 Didn't find class "android.view.Toolbar 이다.

구글링을 하니 내가 사용한 Toolbar 라는것이 안드로이드 4. 대 버전에서는 지원을 하지 않는다고한다.

5. 대 버전부터 지원이 된다는...;;

킷켓은 안된다.. 롤리팝 부터 지원이 된다고 한다.;;;

아 이것도 모르고 설치 최소 버전을 4 점대로 해놔서 킷켓 사용자들에게 에러가 발생되었다.

최소 버전을 롤리팝으로 하고 다시 배포를 해야하는건지.. ActionBar 를 바꿔야 하는건지.

일단 최소버전 부터 바꿔 에러가 발생되는 일이 없도록 해야겠다.^^

 

ref

https://stackoverflow.com/questions/35883622/how-to-add-toolbar-to-android-app-without-support-library

 

728x90
Posted by kjun.kr
,