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

Crash inflating view on Android 4.4.X #55

Open
ItsCalebJones opened this issue Mar 19, 2019 · 0 comments
Open

Crash inflating view on Android 4.4.X #55

ItsCalebJones opened this issue Mar 19, 2019 · 0 comments

Comments

@ItsCalebJones
Copy link

The layout doesn't even reference anything from the theme engine as far as I can tell.

Here's the stacktrace:

Caused by java.lang.NumberFormatException: Invalid int: "res/color/cyanea_primary.xml"
       at java.lang.Integer.invalidInt(Integer.java:137)
       at java.lang.Integer.parse(Integer.java:374)
       at java.lang.Integer.parseInt(Integer.java:365)
       at com.android.internal.util.XmlUtils.convertValueToInt(XmlUtils.java:122)
       at android.content.res.TypedArray.getInt(TypedArray.java:267)
       at android.widget.ImageView.(ImageView.java:166)
       at androidx.appcompat.widget.AppCompatImageView.(SourceFile:72)
       at androidx.appcompat.widget.AppCompatImageView.(SourceFile:68)
       at androidx.appcompat.app.AppCompatViewInflater.createImageView(SourceFile:187)
       at androidx.appcompat.app.AppCompatViewInflater.createView(SourceFile:107)
       at androidx.appcompat.app.AppCompatDelegateImpl.createView(SourceFile:1267)
       at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(SourceFile:1317)
       at com.jaredrummler.cyanea.inflator.CyaneaLayoutInflater$WrapperFactory2.onCreateView(SourceFile:195)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:762)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:771)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:499)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
       at com.jaredrummler.cyanea.inflator.CyaneaLayoutInflater.inflate(SourceFile:61)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
       at cz.kinst.jakub.view.SimpleStatefulLayout.init(SourceFile:216)
       at cz.kinst.jakub.view.SimpleStatefulLayout.(SourceFile:36)
       at java.lang.reflect.Constructor.constructNative(Constructor.java)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
       at android.view.LayoutInflater.createView(LayoutInflater.java:601)
       at com.jaredrummler.cyanea.inflator.CyaneaLayoutInflater.processView(SourceFile:138)
       at com.jaredrummler.cyanea.inflator.CyaneaLayoutInflater.access$createCustomView(SourceFile:34)
       at com.jaredrummler.cyanea.inflator.CyaneaLayoutInflater$PrivateWrapperFactory2.onCreateView(SourceFile:213)
       at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
       at android.view.LayoutInflater.rInflate(LayoutInflater.java:762)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:499)
       at android.view.LayoutInflater.inflate(LayoutInflater.java:398)
       at com.jaredrummler.cyanea.inflator.CyaneaLayoutInflater.inflate(SourceFile:61)
       at me.calebjones.spacelaunchnow.news.ui.news.NewsListFragment.onCreateView(SourceFile:73)
       at androidx.fragment.app.Fragment.performCreateView(SourceFile:2530)
       at androidx.fragment.app.FragmentManagerImpl.moveToState(SourceFile:887)
       at androidx.fragment.app.FragmentManagerImpl.moveFragmentToExpectedState(SourceFile:1233)
       at androidx.fragment.app.FragmentManagerImpl.moveToState(SourceFile:1299)
       at androidx.fragment.app.BackStackRecord.executeOps(SourceFile:688)
       at androidx.fragment.app.FragmentManagerImpl.executeOps(SourceFile:2069)
       at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(SourceFile:1859)
       at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(SourceFile:1814)
       at androidx.fragment.app.FragmentManagerImpl.execSingleAction(SourceFile:1691)
       at androidx.fragment.app.BackStackRecord.commitNowAllowingStateLoss(SourceFile:537)
       at androidx.fragment.app.FragmentPagerAdapter.finishUpdate(SourceFile:148)
       at androidx.viewpager.widget.ViewPager.populate(SourceFile:1244)
       at androidx.viewpager.widget.ViewPager.populate(SourceFile:1092)
       at androidx.viewpager.widget.ViewPager.onMeasure(SourceFile:1622)
       at android.view.View.measure(View.java:16749)
       at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:719)
       at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:455)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5295)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
       at android.view.View.measure(View.java:16749)
       at androidx.constraintlayout.widget.ConstraintLayout.internalMeasureChildren(SourceFile:1227)
       at androidx.constraintlayout.widget.ConstraintLayout.onMeasure(SourceFile:1572)
       at android.view.View.measure(View.java:16749)
       at androidx.drawerlayout.widget.DrawerLayout.onMeasure(SourceFile:1119)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5295)
       at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasureChild(SourceFile:733)
       at androidx.coordinatorlayout.widget.CoordinatorLayout.onMeasure(SourceFile:805)
       at android.view.View.measure(View.java:16749)
       at androidx.drawerlayout.widget.DrawerLayout.onMeasure(SourceFile:1119)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5295)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
       at androidx.appcompat.widget.ContentFrameLayout.onMeasure(SourceFile:143)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5295)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5295)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5295)
       at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1413)
       at android.widget.LinearLayout.measureVertical(LinearLayout.java:696)
       at android.widget.LinearLayout.onMeasure(LinearLayout.java:589)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5295)
       at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
       at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2439)
       at android.view.View.measure(View.java:16749)
       at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2072)
       at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1175)
       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1372)
       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1062)
       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5996)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
       at android.view.Choreographer.doCallbacks(Choreographer.java:574)
       at android.view.Choreographer.doFrame(Choreographer.java:544)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5590)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
       at dalvik.system.NativeStart.main(NativeStart.java)

Here's the layout:

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/news_coordinator"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <cz.kinst.jakub.view.SimpleStatefulLayout
        android:id="@+id/news_stateful_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:emptyLayout="@layout/empty_news"
        app:progressLayout="@layout/custom_progress">

        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
            android:id="@+id/news_refresh_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent">

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/news_recycler_view"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
    </cz.kinst.jakub.view.SimpleStatefulLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
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