Google Play 64-bit requirement - java

I'm trying to submit an update to my app, after uploading the Android App bundle I get this error message :
I've read the documentation and follow all steps, after analyzing the Android App bundle :
My app is a Photo Editor app, with pure java, I don't use any native code, but I used some third-party library such as
implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
which supports the 64 bit as you can see in the image above
here's my Gradle file :
android {
compileSdkVersion 29
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
defaultConfig {
applicationId "maa.abc"
minSdkVersion 18
targetSdkVersion 29
versionCode 14
versionName "1.2.0"
multiDexEnabled true
renderscriptTargetApi 28
renderscriptSupportModeEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64' 'armeabi'
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.annotations1'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':appintro')
/*ANDROID*/
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.exifinterface:exifinterface:1.0.0'
implementation 'com.android.support:support-annotations:28.0.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
annotationProcessor 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
/*PHOTO FILTERS (CONTAINS NATIVE CODE)*/
implementation 'cn.ezandroid:EZFilter:2.0.9'
implementation 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.4.1'
/*ANIMATION*/
implementation 'com.daimajia.easing:library:2.0#aar'
implementation 'com.daimajia.androidanimations:library:2.3#aar'
/*GLIDE*/
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
implementation 'com.github.bumptech.glide:glide:4.9.0'
/*PICK IMAGE /TAKE PICTURE*/
implementation 'com.github.jkwiecien:EasyImage:1.3.1'
/*TEST IMPLEMENTATION*/
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
testImplementation 'junit:junit:4.12'
/*VIEWS*/
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
implementation 'de.hdodenhof:circleimageview:3.0.0'
implementation 'com.alexvasilkov:gesture-views:2.5.2'
implementation('com.github.christophesmet:android_maskable_layout:v1.3.1') {
exclude group: 'com.intellij', module: 'annotations'
}
implementation 'com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:1.0.0'
implementation 'com.github.duanhong169:checkerboarddrawable:1.0.2'
/*FIREBASE*/
implementation "com.google.firebase:firebase-core:17.0.1"
implementation "com.google.firebase:firebase-storage:18.1.1"
implementation 'com.google.firebase:firebase-database:18.0.1'
implementation 'com.firebaseui:firebase-ui-database:5.0.0'
/*HELPER*/
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
implementation 'org.apache.commons:commons-collections4:4.3'
implementation 'com.github.nanchen2251:CompressHelper:1.0.5'
implementation 'com.google.code.gson:gson:2.8.5'
implementation(group: 'uz.shift', name: 'colorpicker', version: '0.5', ext: 'aar')
/*CHANGING FONT*/
implementation 'io.github.inflationx:viewpump:2.0.2'
implementation 'io.github.inflationx:calligraphy3:3.1.1'
}
apply plugin: 'com.google.gms.google-services'
with this cmd I'm able to install my app on my phone successfully:
# A successful install:
> adb install --abi armeabi-v7a YOUR_APK_FILE.apk
Success
I tried to upload .APK but still I get the same error message, although I see my app support all native platforms :
Can anyone help me to get resolve this issue ?, I have spent almost 1 week to submit an update to my app with no success.
UPDATE:
I have contacted google before 3 days ago, they said this :
Thanks for contacting Google Play Developer Support to report the behavior you're seeing with your App Bundle being flagged for 64 compliance.
I’ve documented your issue and escalated it to our technical team for further investigation. Our team is working to resolve this issue for you as soon as possible.
I appreciate your patience and I’ll let you know the moment I have an update.
If you have any other questions in the meantime, please let me know.

Finally, after 1 week stuck in this situation, the problem was in RenderScript and .bc files, I have removed all .bc file from the project and removed those line as well.
renderscriptTargetApi 28
renderscriptSupportModeEnabled true
here's my final Gradle :
compileSdkVersion 29
buildToolsVersion "29.0.0"
dexOptions {
preDexLibraries = false
javaMaxHeapSize "4g"
}
defaultConfig {
applicationId "maa.abc"
minSdkVersion 18
targetSdkVersion 29
versionCode 19
versionName "1.9"
ndk.abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

Related

Error java.lang.NoSuchMethodError - External libraries

Hi i am trying to use some external libraries, the things is thats their are aparently detected in compile time
Because i can go to the reference
But when i try to run it i get the following error
What is strange to me is that the file that contains the method does not appear in my external files
When i search for it in the files it supposed to appear here
as rememberLottieComposition.kt
but instead only appear RememberLottieCompositionKT.class
BTW, when i look in my files the file that contains the missing method exist
So no idea how to solve it, i have tried a lot but no results.
Any idea of what may it be will really help!
Thank you in advance
This is my build gradle:App
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdkVersion 30
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.perri"
minSdkVersion 23
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
//de 1.5.1
}
}
//compose_version = '1.0.0-beta01'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0' // appcompat library
//noinspection GradleCompatible
implementation 'com.android.support:design:28.0.0'
implementation 'androidx.core:core-ktx:1.5.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation "com.airbnb.android:lottie:4.0.0"
implementation "com.airbnb.android:lottie-compose:4.0.0"
implementation "androidx.compose.runtime:runtime:1.0.0-beta01"
implementation 'androidx.recyclerview:recyclerview:1.0.0'
//noinspection GradleCompatible
implementation 'com.android.support:recyclerview-v7:25.3.1'
//swipe
implementation 'it.xabaras.android:recyclerview-swipedecorator:1.2.3'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.compose:compose-runtime:0.1.0-dev10'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
}
And this is the other build Gradle

Can't implement firebase dependencies on my android app

i'm developing an Android Studio App and trying to create a user register activity. I already added firebase into the project but when i try to add the firebase database dependencies, the app crashes instantly and not a single error is reported. However, when i remove the 3 implements from the build gradle, it runs correctly. Here i leave both build gradle codes. Thanks.
Build gradle project:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.4'
classpath 'com.google.gms:google-services:4.3.8'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Build gradle app (this works properly):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.jota02"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//new implements
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.google.android.material:material:1.4.0-beta01'
implementation platform('com.google.firebase:firebase-bom:28.0.1')
}
Build gradle app (this crashes):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.jota02"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
//new implements
implementation 'com.google.android.material:material:1.3.0'
implementation 'com.google.android.material:material:1.4.0-beta01'
implementation platform('com.google.firebase:firebase-bom:28.0.1')
implementation 'com.google.firebase:firebase-auth:21.0.1'
implementation 'com.google.firebase:firebase-core:19.0.0'
implementation 'com.google.firebase:firebase-database:20.0.0'
}
SOLVED
The problem just was that i was running an old Android Studio version. I updated Android Studio and checked the gradle versions and now it's all working properly, thanks.
When you use firebase-bom dependency, you no need to mention version for firebase-database and other firebase library.
firebase-bom will choose right version for you or if you want particular version of firebase remove firebase-bom.so add dependency like below
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:28.0.1')
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-database'

How to fix gradle when this error appear?

I started a new project and put fire-base cloud:
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "android.example.com.squawker"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
testImplementation 'junit:junit:4.12'
// RecyclerView
implementation 'com.android.support:recyclerview-v7:28.0.0'
// Schematic dependencies for ContentProvider
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
implementation 'net.simonvt.schematic:schematic:0.6.3'
// Preferences Dependencies
implementation 'com.android.support:preference-v7:28.0.0'
// Firebase dependency
implementation 'com.google.firebase:firebase-messaging:17.3.4'
}
// Apply the Google Services plugin. Make sure to add the google-services.json file in the app
// folder. You download it from the Firebase console
apply plugin: 'com.google.gms.google-services'
and this error apeared:
WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.
Affected Modules: app
This probably because of apt plugin which is already obsolete. So, you need to remove the following:
apply plugin: 'android-apt'
then change the following:
apt 'net.simonvt.schematic:schematic-compiler:0.6.3'
with:
annotationProcessor 'net.simonvt.schematic:schematic-compiler:0.6.3'
Similar to API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with 'variant.getExternalNativeBuildProviders() Happy Coding!

Why android studio give an error when i add dependency?

I'm building a face detection Android app. When I add dependency inside the app/build.gradle it gives me an error. Here is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.example.android.emojify"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support ', module: 'support-annotations'
})
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services-vision:10.2.0'
testImplementation 'junit:junit:4.12'
}
Error is reported in the following lines:
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
Show us a screenshot of your error or format your error to easier reading, just click code button and paste it.
Edit: thank you :)
I think you should use refresh gradle after any changes in gradle.build and maybe you got this error because your build tools sdk is 28.0.3 and you want to use tool from sdk 28.0.0, just change compile sdk to 28.0.0 and click sync gradle on actionbar.
Your buildToolVersion is greater than your design and appcompat-v7.
Try to change,
implementation 'com.android.support:design:28.0.3' //or greater than 28.0.3
implementation 'com.android.support:appcompat-v7:28.0.3' //or greater than 28.0.3
connect to the internet and then build your project. Problem will be solved.

How to solve a Duplicate zip entry

I have this problem: When I run my project on Android Studio it works fine, but when I try to Build the APK (on BUILD > BUILD Apk(s)) it shows me the next error:
Error:Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
java.io.IOException: Can't write [/Users/sergio/Documents/ink/touch_android/app/build/intermediates/multi-dex/debug/componentClasses.jar] (Can't read [/Users/sergio/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.3.3/63b77400b5f1cf83a81823562c48d3120ef5518e/jackson-databind-2.3.3.jar(;;;;;;**.class)] (Duplicate zip entry [jackson-databind-2.3.3.jar:com/fasterxml/jackson/databind/JsonDeserializer$None.class]))
as far as I know this is caused by a duplicated class called JsonDeserializer, that I found on my project
but I can't find a way to 'unlink' this files from each jar listed. This is my gradle file.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "---"
minSdkVersion 19
targetSdkVersion 23
versionCode -
versionName "-"
renderscriptTargetApi 22
renderscriptSupportModeEnabled true
multiDexEnabled true
ndk {
abiFilters "x86", "armeabi-v7a", "armeabi"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { resources.srcDirs = ['src/main/resources', 'src/main/java/includes'] } }
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
}
}
dependencies
{
//compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
implementation files('libs/gson-2.5.jar')
implementation files('libs/guava-18.0.jar')
implementation files('libs/snmp6_1.jar')
implementation 'com.crittercism:crittercism-android-agent:5.6.4'
implementation files('libs/jackson-annotations-2.2.3.jar')
implementation files('libs/jackson-databind-2.2.3.jar')
implementation files('libs/httpmime-4.3.2.jar')
implementation files('libs/httpcore-4.3.1.jar')
implementation files('libs/commons-lang3-3.4.jar')
implementation files('libs/commons-validator-1.4.0.jar')
implementation files('libs/jackson-core-2.2.3.jar')
implementation files('libs/commons-net-3.1.jar')
implementation files('libs/ZSDK_ANDROID_API.jar')
implementation files('libs/opencsv-2.2.jar')
implementation files('libs/commons-io-2.2.jar')
implementation files('libs/mrzjniInterfaceJar.jar')
implementation 'com.kyleduo.switchbutton:library:1.4.1'
implementation 'com.github.nkzawa:socket.io-client:0.3.0'
implementation 'fr.tvbarthel.blurdialogfragment:lib:2.2.0'
implementation 'com.android.support:multidex:1.0.1'
implementation('de.keyboardsurfer.android.widget:crouton:1.8.5#aar')
implementation 'com.android.support:appcompat-v7:23.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:23.4.0'
implementation files('libs/cw-deviceapi20171026.jar')
implementation 'org.jmrtd:jmrtd:0.5.5'
implementation 'net.sf.scuba:scuba-sc-android:0.0.9'
implementation 'com.madgag.spongycastle:prov:1.54.0.0'
implementation 'edu.ucar:jj2000:5.2'
implementation 'com.github.mhshams:jnbis:1.1.0'
implementation files('libs/BrotherPrintLibrary.jar')
implementation files('libs/MobilePrintLib.jar')
}
try removing this implementation
implementation files('libs/jackson-core-2.2.3.jar')
and do
Build > Clean Project
In the module where you are adding jackson dependency exclude that class which is already in the other lib. Otherwise, exclude it from the other lib and leave it on the jackson.

Categories