Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好在activity中使用 但是报了库里面的错误能帮忙看下吗 #108

Open
douhaopeng opened this issue Mar 23, 2023 · 1 comment

Comments

@douhaopeng
Copy link

FATAL EXCEPTION: main
Process: com.hzsoft.basedemo, PID: 17896
android.view.InflateException: Binary XML file line #7 in com.hzsoft.basedemo:layout/cp_dialog_city_picker: Binary XML file line #24 in com.hzsoft.basedemo:layout/cp_search_view: Error inflating class EditText
Caused by: android.view.InflateException: Binary XML file line #24 in com.hzsoft.basedemo:layout/cp_search_view: Error inflating class EditText
Caused by: java.lang.UnsupportedOperationException: Failed to resolve attribute at index 2: TypedValue{t=0x2/d=0x7f030167 a=-1}
at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:782)
at android.widget.TextView.readTextAppearance(TextView.java:4078)
at android.widget.TextView.(TextView.java:1138)
at android.widget.EditText.(EditText.java:95)
at android.widget.EditText.(EditText.java:91)
at androidx.appcompat.widget.AppCompatEditText.(AppCompatEditText.java:97)
at androidx.appcompat.widget.AppCompatEditText.(AppCompatEditText.java:92)
at androidx.appcompat.app.AppCompatViewInflater.createEditText(AppCompatViewInflater.java:216)
at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:133)
at androidx.appcompat.app.AppCompatDelegateImpl.createView(AppCompatDelegateImpl.java:1569)
at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:1620)
at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:256)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1116)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1052)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1016)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1178)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1139)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1318)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1174)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1139)
at android.view.LayoutInflater.inflate(LayoutInflater.java:696)
at android.view.LayoutInflater.inflate(LayoutInflater.java:548)
at com.zaaach.citypicker.CityPickerDialogFragment.onCreateView(CityPickerDialogFragment.java:114)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3104)
at androidx.fragment.app.DialogFragment.performCreateView(DialogFragment.java:510)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:524)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1817)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:547)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:257)
at android.app.ActivityThread.main(ActivityThread.java:8228)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:626)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1016)

@douhaopeng
Copy link
Author

需要再application中添加android:theme="@style/DefaultCityPickerTheme" 不仅仅只需要在activity中添加

@douhaopeng douhaopeng reopened this Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant