0

If i run the app direct of Android Studio to my smartphone the app works correctly but if downloaded my app on Play Store, the app stop and show me the follow errors:

android.view.InflateException: Binary XML file line #25: Binary XML file line #25: Error inflating class android.support.design.widget.NavigationView
Binary XML file line #25: Error inflating class android.support.design.widget.NavigationView
Binary XML file line #17: Unable to find LayoutManager android.support.v7.widget.LinearLayoutManager

May somebody help me? Thank you.

EDIT: WORKS CHANGE ON GRADLE compile 'com.android.support:design:23.1.0' to compile 'com.android.support:design:23.1.1'

user2227682
  • 73
  • 1
  • 2
  • 8

4 Answers4

1

I'm assuming you're running into the same issue with ProGuard that I nearly went bald over a few months back. Try adding this to your proguard rules file:

# https://code.google.com/p/android/issues/detail?id=78377
# https://code.google.com/p/android/issues/detail?id=78377#c188
#-keep class !android.support.v7.internal.view.menu.**,** { *; }   
# Apparently this was messed up again in v23 and explicitly specifying MenuBuilder is now required
-keep class !android.support.v7.internal.view.menu.*MenuBuilder* { *; }
-keep class !android.support.v7.view.menu.**,!android.support.design.internal.NavigationMenu,!android.support.design.internal.NavigationMenuPresenter,!android.support.design.internal.NavigationSubMenu,**

I noted the bug reports I found for the v21 issue (that also lead to the solution for the v23 issue)

Cruceo
  • 6,763
  • 2
  • 31
  • 52
  • 1
    I changed on Gradle. compile 'com.android.support:design:23.1.0' to compile 'com.android.support:design:23.1.1' and works correctly Thank you! – user2227682 Jul 08 '16 at 18:47
0

If you are using android studio then first clean the build and then click on generate signed apk and send it to Play store. Newer version of android studio won't allow to run apk directly to devices

Aditi
  • 455
  • 4
  • 13
0

Before uploading your app to play store, test the exact same artifact (.apk file). I suggest you use the gradle command line to do so.

By running ./gradlew clean build you make sure you will have an releasable apk, push that version to you device adb install app/build/outputs/apk/app-release.apk), if it works ok, than upload that file. The path may not be exactly the same for you, but that's the idea.

The build process by default creates a debug and release versions of your app, studio by default installs the debug version on your device, but you should also try out the release one and that's the one you upload.

https://developer.android.com/studio/build/index.html

0

Make sure you generate signed apk before uploading on google play. Follow these steps to generate signed apk : Step 1 Go to Build>Generate Signed APK>Next (module selected would be your module , most often called "app")

Step 2 Click on create new

Step 3 Basically, fill in the form with the required details.

Step 4 Click on Next and then select Release.

It will work