8

I am using this implementation: 'com.google.vr:sdk-panowidget:1.160.0' in order to show 360 image, but I get the error below; while uploading app to play store:

Error
This release is not compliant with the Google Play 64-bit requirement

The following APKs or App Bundles are available to 64-bit devices,
 but they only have 32-bit native code: 130.

Include 64-bit and 32-bit native code in your app. Use 
the Android App Bundle publishing format to automatically
ensure that each device architecture receives 
only the native code that it needs. 
This avoids increasing the overall size of your app. Learn More

Note: The lib is not creating lib/x86_64.so file.

Please help!

elyar abad
  • 771
  • 1
  • 8
  • 27
PPV
  • 107
  • 1
  • 1
  • 8
  • Use the Android App Bundle publishing format to automatically ensure that each device architecture receives only the native code that it needs. – Zun Aug 20 '19 at 07:33
  • I tried this and still it doesn't add the 64bit support.. I still see only 'armeabi-v7a' , 'arm64-v8a'and 'x86' Is there anything I've missed? – PPV Aug 20 '19 at 08:28
  • Is there a reason you're using version `1.160.0`? I recommend you at least try out version `1.200.0` – Zun Aug 20 '19 at 08:30
  • `arm64-v8a` is what needs to be built; `x86_64` is merely useless, since there are not hardware devices. voted to close this, because it's unclear what you are asking, based on the error message (the output). – Martin Zeitler Aug 20 '19 at 09:05
  • I am not able to upload apk to play store as it's giving the mentioned warning. – PPV Aug 20 '19 at 10:16

4 Answers4

18

I had the same problem with my app and this is what worked for me.

I'm using the AAB format to upload the app and my build.gradle had this architecture targets: "armeabi-v7a", "arm64-v8a, "x86","x86_64". But after building the project, the 'x86_64' folder was not created inside the AAB. So I decided to remove 'x86' and 'x86_64' and now my build.graddle looks like this

     defaultConfig {
        ...
        ndk {
            abiFilters  "armeabi-v7a", "arm64-v8a"
        }
        ...
     }
     splits {
        abi {
            ...
            include  "armeabi-v7a", "arm64-v8a"
        }
     }
     applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "arm64-v8a":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
     }

This allow me to publish in google playstore with any problems. Hope it helps!

NOTE: Please, note that removing target architectures results in less target devices, as @UzairAslam says in comments below. So, try to understand if this workaround fits to your project needs.

Bruno Sendras
  • 571
  • 5
  • 7
  • I am able to solve my problem using above code. Thanks buddy. – Mayuri Ruparel Sep 03 '19 at 15:20
  • Thank you so much Bruno this post really help me a lot – Varsha Parmar Sep 19 '19 at 12:47
  • you do realize that this not recommended and will target less devices? – Uzair Aslam Jan 12 '20 at 12:12
  • @UzairAslam Yes, I did realize. So I took note of the amount of target devices before and after doing that change. It results that the amount of devices not being targeted was 1 (from a total of 9360 devices). So we decided to remove 'x86' 'x86_64' target architectures in which our application will never run, and we feel comfortable with that decision. We use x86 target architectures only for get better performance when the app runs on Android Emulator, which actually runs over a x86 architecture. Please, if you have a better solution, please, feel free to share it. – Bruno Sendras Jan 13 '20 at 01:20
  • @BrunoSendras.. as long as you mention it, its fine. Because people might take your solution without knowing the implications. Now that you have mentioned it , its fine . Cheers – Uzair Aslam Jan 13 '20 at 08:04
  • This looks more like a bug on Gradle's part that removing an architecture actually makes it build with the 64 bit executables! – doctorram Apr 30 '20 at 13:04
  • Thanks a bunch, this helped me – Lutaaya Huzaifah Idris Aug 13 '20 at 20:06
  • x86_64 powers most of the Chromebooks, which run Android apps naturally, but are not listed when you count *not targeted* devices. – Alex Cohn Sep 16 '20 at 17:36
2

Starting August 1, 2019:

  • All new apps and app updates that include native code are required to provide 64-bit versions in addition to 32-bit versions when publishing to Google Play.
  • Extensions: Google Play will continue to accept 32-bit only updates to existing games that use the following SDKs:

    • Corona Labs SDK - until August 2020
    • Adobe Air software and the AIR SDK - until August 2020
    • Unity 5.6.7 or older - until August 2021

See https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html for more info

Manohar
  • 22,116
  • 9
  • 108
  • 144
  • 1
    Ya. I tried it. Added ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' in my gradle but it's not creating 'x86_64' folder. – PPV Aug 20 '19 at 07:37
  • 1
    I have Added ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' in my gradle but it's not creating 'x86_64' folder – Muhammad Nauman Feb 20 '20 at 14:38
2

Check for analyzation. steps are Here. After follwing the steps and generating apk, When uploaded to play store it gives same error.

Before uploading to play store check whether your apk is supporting 64 bit architecture or not. Follow and check instructions given Here. Specially follow Using Bundletool which is mentioned in link.

Hint: while Using bundle tool. keep your jks, aab, and build tool jar file in same folder.

If still you are getting a warning in command prompt as "WARNING: App Bundle contains 32-bit RenderScript bitcode file (.bc) which disabl es 64-bit support in Android. 64-bit native libraries won't be included in gener ated APKs." then you need to check your code.

Possibilities are, you may added a project as a module and that may have native code. So how to check your project has native code. for this check res/raw folder in each and every module. It may have *.bc files. Try to update renderscriptTargetApi in your modules gradle file if your module is using any scripting files/classes.

If the issues got fixed then probably you will not see *.bc files in any folder and then check once again in command prompt for support of 64 bit. If you won't get any warning then your are good to go and deploy.

Tara
  • 2,598
  • 1
  • 21
  • 30
1

I also had the same issue as there was no x86_64.so file in the lib but it was generating "armeabi-v7a" , "arm64-v8a" and "x86" .so files , I simply solved the problem by updating the library I had 'org.adblockplus:adblock-android-webview:3.14' and I just updated it to 3.16 and the problem was solved. So please check your library documentation and note that sometimes the documentation does not contain the upgraded version, you have to just hit and try (eg. change from 3.14 to 3.15 or 3.16) to get the latest version.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Nitish kumar
  • 51
  • 1
  • 2