Announcement

Collapse
No announcement yet.

Xapk validation failed google play

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Xapk validation failed google play

    Hi
    After first download from google play i getting xapk validation failed.
    My apk is 25m.
    Please help
    10x

    #2
    I was able to find a previous post about this issue, but I'm not sure how much help it will be: https://forums.unrealengine.com/show...idation-failed
    Learn Unreal Engine 4 | Unreal Engine 4 Book | Unreal Engine 4 Video Course

    Comment


      #3
      there is no temp fix?
      most people with newer phones has this issue.
      i tried adding android.permission.WRITE_EXTERNAL_STORAGE on project settings->extrapermissions array and checking UseexternalFilesDir with no success

      Comment


        #4
        Besides that savegames are not saved on devices with android 23up

        Comment


          #5
          It's still not investigated when it occurs... We know that for sure it's not related to Android Version and Device Model... It's not possible to make hotfix when reason is unknown.
          Last edited by gameDNA studio; 07-11-2017, 08:59 AM.
          Realtime Database Firebase | Ultimate Mobile Kit Firebase | Extended Facebook | Universal Mobile Ads | Google Analytics

          Comment


            #6
            I think the fix has to come from epic.

            Right now, the obb is saving in the root folder.
            When the game first loads up, it looks for the obb but does not have the permission to find it.
            Unreal doesn't ask for the permission and then you get the XAPK validation error.

            One user has said he changed up his Downloader.Activity.java file to request the access when temp access isn't granted.
            "I have edited DownloaderActivity.java.template to request for Storage access permission request at first if not granted as temp solution.."
            He didn't share exactly what he did though.

            Here is the google link of the issue for people who use other platforms to develop games. Google has known about the issue for years but what people in the thread complain about is being forced to USE a dangerous permission to make the error go away. Currently in UE4, even WITH the write external permission activated, the XAPK error still happens.

            Android permissions cant be requested at run time from inside the game because the game is never properly installed enough to get to that point.

            Common Denominators
            -Game over 100 mbs with an OBB file.
            -Fresh installs only (updates of the game work fine)
            -Targeting SDK 23 or above

            Another issue is the UE4 game files saving out in the open including the save files. Don't know if that has any affect on the above.

            For anyone that is running into this, the user has 3 options at the moment.
            1. The one that works 100% of the time is simply restarting the device. The obb is placed correctly for some reason and the game installs properly when loading the app.
            2. The second thing is going to settings>applications>(App name)>permissions>storage and turning it on. When you load up the game, the app will properly install.
            3. The 3rd is something that doesn't work 100% of the time, but when the app loads up and you see the xapk, sometimes you can press the android back button and it will ask for the storage permission. After saying yes, the app will background itself and take you to the home screen. If you go straight back to the app, it will crash. If you force close the app and reopen it, it will work properly.

            Hope this helps.

            Comment


              #7
              You can try making this modification to GameActivty.java.
              Code:
              PermissionHelper.acquirePermissions(new String[] {"android.permission.WRITE_EXTERNAL_STORAGE"}, this);
              This is only called for non-shipping builds right now. Try moving it out of the else so it is always called. This will make it request permission even if it doesn't need to download, though.

              If you only want it to do this if it has to download the OBB you can put it in Build/Android/Java/JavaTemplates/DownloaderActivity.java.template in onCreate() after the
              Code:
              GameActivity.Log.debug("... Whoops... missing; go go go download system!");
              maybe. I'm going to have to do some more looking into this.

              Also add
              Code:
              import com.google.vr.sdk.samples.permission.PermissionHelper;
              with the other imports.

              Comment


                #8
                Hey Chris,

                I gave both solutions a try but neither did the trick.
                I did try both at the same time as well but XAPK still shows.
                I uploaded the apk and OBB to the store for all 3 builds.

                The OBB gets downloaded from the store into root>sdcard>Android>obb if that helps at all.

                I do appreciate you trying to help me out. If you have any other suggestions, let me know.

                Comment


                  #9
                  (Meant to edit the post above. Sorry)
                  edit:
                  So i ended up moving
                  Code:
                  PermissionHelper.acquirePermissions(new String[] {"android.permission.WRITE_EXTERNAL_STORAGE"}, this);
                  to the "Else" (Check 'em Dano...lol) part of that statement because the OBB was downloaded correctly. When i open the game now, it does ask for storage permissions immediately which is cool.
                  The problem is that even after accepting, it just sits there.
                  Is there a way to call the install process of the OBB once accepted.

                  I am thinking it might be this code
                  Code:
                  ProcessOBBFiles();
                  Found slightly below.
                  I think it is trying to run that code before I even accept the storage permissions so even after i accept, it doesn't try again basically.
                  Any advice on this?
                  Last edited by Loreliya; 10-03-2017, 01:30 AM.

                  Comment


                    #10
                    I think it might need some restructuring to do checks if already granted and to deal with onRequestPermissionResult to resume; this looks a little messier of a fix.

                    Comment


                      #11
                      Any resolution on this? I have been trying to get a distribution build to work after downloading from the Play Store with 4.18.2 but always get the xapk validation failed error.

                      Comment


                        #12
                        did you check user externalfilesdir in project settings/Android?

                        Comment


                          #13
                          I think thats partially working. The download screen still shows up and says xapk validation failed but it seemed to run afterwards after freezing for awhile. I will test some more later today. It seems somewhat broken still considering the .APK and the .OBB files are downloaded when you install off google play and the obb is not downloaded separately on the first run.

                          Comment


                            #14
                            Anyone here who know how to fix this problem

                            Comment


                              #15
                              Still waiting for the this ?

                              Comment

                              Working...
                              X