Android adapt realm to 64 bit - android

I am migrating one application to 64 bit to make an update in Google Play store but, after follow android developers instructions, Google play console keeps saying I have to adapt to 64 bit.
Inside Analyze APK I have the following:
I have also included in my gradle file the following:
myApplication {
minSdkVersion 21
applicationId 'com.app.myApplication'
targetSdkVersion 28
versionCode 150
versionName '2.8.0'
signingConfig signingConfigs.myApplication
manifestPlaceholders = [ROTATION_PREF: "unspecified"]
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
What I am missing?
Thank you,

All problem was with realm version.
The one that I had was to old to adapt to 64-bit environment.
Once's I changed the version for a newer one, x86_64 library appeared.

Related

I get this error when uploading my app: Upload failed You need to use a different version code for your APK than version code 1

I have an app on google play store. Currently there's only one upload.
And I want to upload a new version, but when ever I do that this error shows:
Upload failed You need to use a different version code for your APK because you already have one with version code 1
No matter weather it is versioncode 1, 2 or 3. The first release way versioncode 1, and this is versioncode 2.
I don't know what the problem is, maybe I have to sync the build.gradle, I've heard some ppl talk about that, but I am not 100% sure how to?
Also If I make a new 'App' and upload it there this error doesn't show op, that's probably because on that 'app' there's no other app-release with that name, or any with higher.
Also, there's like 300 different build.gradle files, the one I am talking about is the one under the directory
ApplicatioName\myApplication\build.gradle
Here is the build.gradle:
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion 16
targetSdkVersion 30
versionCode 2
versionName "2.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
What do I do?
In Flutter, at least in my experience, you don't need to modify version codes anywhere but in pubspec.yaml. Say your version tag there is version: 1.0.0+1, your android version code will be 1 and your user visible version name is 1.0.0. You can change this to version: 1.1.0+2, for example, and that should fix your problem.
Edit: And, obviously, rebuild.

This release is compliant with the Google Play 64-bit requirement native app

While uploading apk to Play store I am getting a warning saying "This release is compliant with the Google Play 64-bit requirement.". When I analyze the app architecture using Android studio. I am able to found both ".so" files under the lib folder. Here is the screenshot for that:
I have also added bellow line to my gradle file and in my used libraries too:
defaultConfig {
applicationId "com.demo.user"
minSdkVersion 19
targetSdkVersion 28
versionCode 4
multiDexEnabled true
versionName "1.3"
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "android.support.rounded_green_cremeway.runner.AndroidJUnitRunner"
}
splits {
abi {
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
While uploading signed Apk to play store I getting bellow issue. Please let me know if I need to do something else.
Any help would be greatly appreciated!!!!
It's an information, not a warning - a major and very important difference.
64Bit compliance only tells you, that all your native parts are available as 64Bit.
This is a good thing and not a warning. You WANT that.
You would get a warning the other way round: If there were any parts that are available only as 32Bit (and therefore not 64Bit compliant).
It's all ok with your project. Be happy if you see this information.

How to Include 64-bit and 32-bit native code in my app

I can't uplaod my app to playstore got this error
I have also build "Android App Bundle" to upload the app but again got this 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: 111.
defaultConfig {
applicationId "com.iqvis.com.buenosdias"
minSdkVersion 17
targetSdkVersion 26
versionCode 111
versionName "10.11"
multiDexEnabled true
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
In 2017, Google announced that in Aug'19 Apps on the PlayStore should provide the subsequent version of 32 bit native libraries in 64 bit. 64 bit is supported since Android 5( Lollipop ) days.
Now to check your apk
Open Android Studio, and open any project.
From the menu, select Build > Analyze APK and select the APK which you want to evaluate.
Now, if in the analyzer you look into lib folder, and in that you see any .so then you have 32-bit libraries or if you have any armeabi-v7a or x86, then you have 32-bit libraries
If you see no .so files, then your app requires no upgrade versions.
Upgrade to 64 bit architecture
// Your app's build.gradle
apply plugin: 'com.android.app'
android {
compileSdkVersion 27
defaultConfig {
appId "com.google.example.64bit"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
}
For more info check this https://www.youtube.com/watch?v=E96vmWkUdgA

Flutter abiFilters not generating libflutter.so for all architecture

In my Flutter application I am trying to generate apk that should work on all the devices whether it is 32 bit or 64 bit.
For that I have put the following lines in my build.gradle file. But it looks like it is not generating the libflutter.so for all the architectures.
android {
compileSdkVersion 27
defaultConfig {
appId "com.google.example.64bit"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
As we can see in the below image the libflutter.so is present only in armeabi-v7a and all other folder are missing it. This issue crashes my app on startup when I release it on Google Play.
Exceptions
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/abc.xyz.idar-1/base.apk"],nativeLibraryDirectories=[/data/app/abc.xyz.idar-1/lib/arm64, /data/app/abc.xyz.idar-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]] couldn't find "libflutter.so"
I am using flutter build apk command to generate the apk.
This is a currently known issue in Flutter repository. I hope they are able to fix this soon.
https://github.com/flutter/flutter/issues/18494.
I found the best work around is to follow this comment.
When you run flutter build apk, this work around will remove all resources in 64-bit folders. Thus, the 64-bit device will only use resources in 32-bit folder.
I've been struggling for this issue for more than a month. Finally flutter has released a so called PATCH in manner to support the 64 bit application building support.
To build the application by their architecture use flutter SDK version 1.7.4 or greater. Its still in dev channel but things are working as expected. Here is the link to download the SDK
Now lets come to main code where all magic happens:
DO NOT INCLUDE ANY ABI FILTERS IN YOUR GRADLE FILE TO GENERATE THE SPLIT APKs
defaultConfig {
applicationId "YOUR.PACKAGE.NAME"
minSdkVersion 19
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
signingConfig signingConfigs.debug
minifyEnabled false
}
}
Now open terminal and use this command on your root directory to generate the Apks
\\PATH_TO_YOUR_FLUTTER_SDK_DIR\bin\flutter build apk --split-per-abi
For example in my case:
D:\flutter_windows_v1.2.1-stable\flutter_v1.7.4-dev\flutter\bin\flutter build apk --split-per-abi
Well it will take pretty long time to generate, but it worth and works lol... here is some output logs for just reference.
Running Gradle task 'assembleRelease'... Done 139.7s (!)
Built build\app\outputs\apk\release\app-armeabi-v7a-release.apk (10.0MB).
Built build\app\outputs\apk\release\app-arm64-v8a-release.apk (10.3MB).
Upgarde/Switch to flutter master channel (if you aren't using it). The issue is resolved by Flutter team. Now, a single command flutter build apk will produce the apk compatible with both 32-bit and 64-bit architecture.
Change your build.gradle like so
android {
compileSdkVersion 27
defaultConfig {
// Remove ndk.abiFilters from here
}
buildTypes {
release {
ndk.abiFilters 'armeabi-v7a'
}
}
That is what I use to release on Google Play and I haven't got any issue so far.
You can try this command to build 64-bit apk
flutter build apk --release --target-platform=android-arm64
In your build.gradle inside defaultConfig add this:
ndk {
abiFilters "armeabi", "x86", "armeabi-v7a"
}
Run flutter build apk --release
Send apk file to Play store.

Fully shadowed APK When try to publish apk in play store

I want to publish my app to Play store. but i faced some strange problem, i don't know what i should to do.
When i was upload App Bundle file app.abb and tried to upload apk-released.apk file, the play store console said me
"Upload failed
You need to use a different version code for your APK or Android App Bundle because you already have one with version code 1."
The screenshot is here: https://drive.google.com/file/d/1N6xP8lGMfUoQh9EcC98BvO2KS_m49tas/view?usp=sharing
Then i was changed the version code to 2
the code is here
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
// buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.banglaralonews.app"
minSdkVersion 17
targetSdkVersion 26
versionCode 2
versionName "1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id : "",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
}
then it's uploaded fine but there occurred another strange problem the console said "Fully shadowed APK"
Screenshot is there:
https://drive.google.com/file/d/1-pBXk1NvxPB_Wqe6IH4b8-vHb-SNwvx3/view?usp=sharing
then i was delete the project again and again i was tried like this but the same problem. so please help me to publish my apk.
The problem is that you're trying to retain your previous APK (version code 1), which you don't need to. Just deactivate the older version of the APK then you will be able to rollout the new version... Also, always check for existing questions on the same topic.
It works for me to change the version code 2.4 -->2.5
I did not encounter such a problem, but I would try to make versionCode higher than usual, for example 10 or 20. And versionName 2.0.
I remember I forgot what version I already had in the Google Play store and randomly set 16 to accurately overcome the limit and I managed to do it successfully.

Categories

Resources