lamudi-gmbh/android-phone-field

Crash on start over kotlin proyect

danielgomezrico opened this issue · 1 comments

Using version 0.1.3 with:

  • kotlin: "1.2.21"
  • compileSdk: 26,
  • minSdk : 16,
  • buildTools: "26.0.2"
  • support Library: "27.0.1",
  • Google Play Services: "11.6.0",

If I put PhoneInputLayout or PhoneEditText in my layout I get an error on activity start:

Process: ..., PID: 19490
   java.lang.RuntimeException: Unable to start activity ComponentInfo{.../....screens.individual.signup.SignUpActivity}: android.view.InflateException: Binary XML file line #11: Binary XML file line #71: Binary XML file line #71: Error inflating class com.lamudi.phonefield.PhoneInputLayout
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892)
       at android.app.ActivityThread.-wrap11(Unknown Source:0)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:164)
       at android.app.ActivityThread.main(ActivityThread.java:6541)
       at java.lang.reflect.Method.invoke(Native Method)
       at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
    Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #71: Binary XML file line #71: Error inflating class com.lamudi.phonefield.PhoneInputLayout
    Caused by: android.view.InflateException: Binary XML file line #71: Binary XML file line #71: Error inflating class com.lamudi.phonefield.PhoneInputLayout
    Caused by: android.view.InflateException: Binary XML file line #71: Error inflating class com.lamudi.phonefield.PhoneInputLayout
    Caused by: java.lang.reflect.InvocationTargetException
       at java.lang.reflect.Constructor.newInstance0(Native Method)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
       at android.view.LayoutInflater.createView(LayoutInflater.java:647)
       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.rInflate(LayoutInflater.java:866)
       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 ....screens.individual.signup.SignUpFragment.onCreateView(SignUpFragment.kt:25)
       at android.support.v4.app.Fragment.performCreateView(Fragment.java:2261)
       at android.support.v4.app.FragmentManagerImpl.ensureInflatedFragmentView(FragmentManager.java:1655)
       at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1390)
       at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1650)
       at android.support.v4.app.FragmentManagerImpl.addFragment(FragmentManager.java:1906)
       at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:3698)
       at android.support.v4.app.FragmentController.onCreateView(FragmentController.java:111)
       at android.support.v4.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:350)
       at android.support.v4.app.BaseFragmentActivityApi14.onCreateView(BaseFragmentActivityApi14.java:39)
       at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:67)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:780)
       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 android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
       at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)

I forgot to add

{
    transitive = true
}

over my gradle dependency setup.