Y
Y
YungSherman2017-02-17 11:28:29
Android
YungSherman, 2017-02-17 11:28:29

Why is the release version of the application not working?

I was developing an android application using Firebase and adding a Google account and ran into a problem. The debug version works fine: the account is added, the data from the table is loaded. I decided to run the release apk on the device. The account seems to be added, but when the data is loaded, the application immediately crashes. This is the error logcat shows:

E/AndroidRuntime: FATAL EXCEPTION: main
                                                   java.lang.RuntimeException: java.lang.NoSuchMethodException: <init> [class android.view.View]
                                                       at android.support.v7.widget.RecyclerView$a.c(Unknown Source)
                                                       at android.support.v7.widget.RecyclerView$o.a(Unknown Source)
                                                       at android.support.v7.widget.RecyclerView$o.a(Unknown Source)
                                                       at android.support.v7.widget.RecyclerView$o.c(Unknown Source)
                                                       at android.support.v7.widget.LinearLayoutManager$c.a(Unknown Source)
                                                       at android.support.v7.widget.LinearLayoutManager.a(Unknown Source)
                                                       at android.support.v7.widget.RecyclerView.N(Unknown Source)
                                                       at android.support.v7.widget.RecyclerView.onMeasure(Unknown Source)
                                                       at android.view.View.measure(View.java:17637)
                                                       at android.widget.RelativeLayout.measureChild(RelativeLayout.java:698)
                                                       at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:482)
                                                       at android.view.View.measure(View.java:17637)
                                                       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5536)
                                                       at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
                                                       at android.view.View.measure(View.java:17637)
                                                       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5536)
                                                       at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436)
                                                       at android.widget.LinearLayout.measureVertical(LinearLayout.java:722)
                                                       at android.widget.LinearLayout.onMeasure(LinearLayout.java:613)
                                                       at android.view.View.measure(View.java:17637)
                                                       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5536)
                                                       at android.widget.FrameLayout.onMeasure(FrameLayout.java:436)
                                                       at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2618)
                                                       at android.view.View.measure(View.java:17637)
                                                       at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2019)
                                                       at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1152)
                                                       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1383)
                                                       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1065)
                                                       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5901)
                                                       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
                                                       at android.view.Choreographer.doCallbacks(Choreographer.java:580)
                                                       at android.view.Choreographer.doFrame(Choreographer.java:550)
                                                       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
                                                       at android.os.Handler.handleCallback(Handler.java:739)
                                                       at android.os.Handler.dispatchMessage(Handler.java:95)
                                                       at android.os.Looper.loop(Looper.java:211)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5389)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at java.lang.reflect.Method.invoke(Method.java:372)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
                                                    Caused by: java.lang.NoSuchMethodException: <init> [class android.view.View]
                                                       at java.lang.Class.getConstructor(Class.java:531)
                                                       at java.lang.Class.getConstructor(Class.java:495)
                                                       at android.support.v7.widget.RecyclerView$a.c(Unknown Source) 
                                                       at android.support.v7.widget.RecyclerView$o.a(Unknown Source) 
                                                       at android.support.v7.widget.RecyclerView$o.a(Unknown Source) 
                                                       at android.support.v7.widget.LinearLayoutManager$c.a(Unknown Source) 
                                                       at android.support.v7.widget.LinearLayoutManager.a(Unknown Source) 
                                                       at android.support.v7.widget.LinearLayoutManager.a(Unknown Source) 
                                                       at android.support.v7.widget.LinearLayoutManager.c(Unknown Source) 
                                                       at android.support.v7.widget.RecyclerView.onMeasure(Unknown Source) 
                                                       at android.view.View.measure(View.java:17637) 
                                                       at android.widget.RelativeLayout.measureChild(RelativeLayout.java:698) 
                                                       at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:482) 
                                                       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5536) 
                                                       at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) 
                                                       at android.view.View.measure(View.java:17637) 
                                                       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5536) 
                                                       at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1436) 
                                                       at android.widget.LinearLayout.measureVertical(LinearLayout.java:722) 
                                                       at android.widget.LinearLayout.onMeasure(LinearLayout.java:613) 
                                                       at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5536) 
                                                       at android.widget.FrameLayout.onMeasure(FrameLayout.java:436) 
                                                       at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2618) 
                                                       at android.view.View.measure(View.java:17637) 
                                                       at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2019) 
                                                       at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1152) 
                                                       at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1383) 
                                                       at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1065) 
                                                       at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5901) 
                                                       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767) 
                                                       at android.view.Choreographer.doCallbacks(Choreographer.java:580) 
                                                       at android.view.Choreographer.doFrame(Choreographer.java:550) 

What I did before:
1) Added SHA-1 and SHA-256 release key fingerprints in the Firebase console.
2) Downloaded the new google-services.json file and replaced the old file with it in the project.
3) Collected apk and signed it with this key.
4) Threw apk on the device.
The application uses fragments with RecyclerView.
I don't understand what I could be missing. In the process of googling, I saw some leads related to Proguard, but this did not give me anything.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
YungSherman, 2017-02-18
@YungSherman

The point was that my ViewHolder and its constructor didn't have an access modifier. Should have been set to "public". Problem solved.

A
aol-nnov, 2017-02-17
@aol-nnov

proguard ate my methods?! ;)
but somehow so ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question