I've been told by Google that "Your app (com.package.name) includes a ZIP file which contains ELF files." I have searched my project. I haven't used a zip file or ELF file anywhere in my project. Thus, it must be in one of my dependencies, but I don't know which one.
I used the following dependencies:
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.code.gson:gson:2.4'
implementation 'io.appsfly.android.utils:micro-app:1.2.22'
implementation 'com.android.support:design:28.0.0-beta01'
implementation 'com.android.support:appcompat-v7:28.0.0-beta01'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.android.support:cardview-v7:28.0.0-beta01'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.google.android.gms:play-services-auth:11.+'
implementation 'com.roughike:bottom-bar:2.3.1'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.twitter.sdk.android:twitter-core:3.1.1'
testImplementation 'junit:junit:4.12'
implementation('com.crashlytics.sdk.android:crashlytics:2.8.0#aar') {
transitive = true;
exclude group: 'com.android.support', module: 'support-annotations'
}
Which of these dependencies "includes a ZIP file which contains ELF files"?
I don't know for sure. But looking at your dependencies, when I google for AppsFly it seems like a platform which delivers dynamic code to apps. And Google Play policy says (as you quote)
An app distributed on Google Play may not modify, replace, or update itself using any method other than Google Play's update mechanism.
So using AppsFly might be against the Policy. To clarify, I know nothing about AppsFly as their website doesn't have much information, but it sure sounds like it breaks the Google Play policy.
Related
I would like to use Cloud Text-To-Speech.
On the documentation page I see that I have to install the client library. On that page you see the code for Maven but in my Android Studio, I am using Gradle and I have no idea how to install it with Gradle.
On MVNRepository I have noticed that I have to use compile group: 'com.google.cloud', name: 'google-cloud-texttospeech', version: '1.2.1'. So on on my application (app -> build.gradle), I have inserted that line to the dependencies. So it looks like this:
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.2'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
compile group: 'com.google.cloud', name: 'google-cloud-texttospeech', version: '1.2.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}
But that gives me the error: More than one file was found with OS independent path 'META-INF/INDEX.LIST'.
Also, Android Studio tells me "compile is deprecated; replace with implementation". If I replace it, I'll get the error: Cannot fit requested classes in a single dex file (# methods: 151443 > 65536)
I also tried to use:
packagingOptions {
exclude 'META-INF/INDEX.LIST'
exclude 'META-INF/DEPENDENCIES'
}
I cleaned my project and restarted the app but then I get the error: Cannot fit requested classes in a single dex file (# methods: 147675 > 65536)
This is too annoying! How can I simply install that library??
Instead of compile group: 'com.google.cloud', name: 'google-cloud-texttospeech', version: '1.2.1', I needed to use implementation 'com.google.cloud:libraries-bom:4.3.0'.
I found a error problem in build.gradle. Have a message to me "All com.android.support libraries must use the exact same version specification (mixing version can lead to runtime crashes). And there is a red line on the bottom of "implementation 'com.android.support:appcompat-v7:28.0.0'".I don't know where I went wrong.
Thank you
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.android.support:design:28.0.0"
implementation "com.android.support:design:28.0.0"
implementation 'com.android.support:palette-v7:28.0.0'
implementation "com.android.support:cardview-v7:28.0.0"
implementation "com.android.support:recyclerview-v7:28.0.0"
//Firebase Dependencies
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.google.firebase:firebase-firestore:18.0.1'
implementation 'com.google.firebase:firebase-database:16.0.6'
implementation 'com.google.firebase:firebase-storage:16.0.5'
implementation 'com.google.firebase:firebase-ads:17.1.3'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-appindexing:17.1.0'
implementation 'com.google.firebase:firebase-ads:17.2.0'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation 'com.artjimlop:altex-image-downloader:0.0.4'
implementation 'com.yalantis:ucrop:2.2.0'
implementation 'com.github.danimahardhika:cafebar:1.3.1'
implementation 'com.github.qiugang:EditTag:v1.2.4-beta2'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.airbnb.android:lottie:2.6.0'
implementation 'com.github.chyrta:AndroidOnboarder:0.7'
//Error Fixer
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-vector-drawable:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
Your gradle dependencies require rework:
Clean the duplicate dependencies and add each line only once!
Lines:
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation "com.android.support:design:28.0.0"
are twice. Keep each one only once!
Use only one version definition of each library. Firebase core has import of two different versions:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.7'
Select one of the two lines.
Depenencies of your dependencies should not have different versions. You have many libraries that use other versions of com.android.support components, which can cause this error.
For example:
'com.artjimlop:altex-image-downloader:0.0.4' use com.android.support:appcompat-v7:23.1.0 see here
'com.yalantis:ucrop:2.2.0' use com.android.support:appcompat-v7:24.2.0 see here
'com.github.danimahardhika:cafebar:1.3.1' use com.android.support:design and com.android.support:cardview-v7 see here
'com.github.qiugang:EditTag:v1.2.4-beta2' use com.android.support:recyclerview-v7 and com.android.support:appcompat-v7 see here
etc the list goes on for almost all 3rd party github libraries.
You can use the following configuration in order to exclude all that dependencies.
configurations {
all*.exclude module: "appcompat-v7"
all*.exclude module: "recyclerview-v7"
all*.exclude module: "design"
all*.exclude module: "cardview-v7"
// ... etc in case there are extra dependencies
}
or even better you can get through each dependency and exclude the exact libraries that cause the duplication:
ie. for 'com.artjimlop:altex-image-downloader:0.0.4' you should change the implementation 'com.artjimlop:altex-image-downloader:0.0.4' with:
implementation ('com.artjimlop:altex-image-downloader:0.0.4') {
exclude group: 'com.android.support', module: 'appcompat-v7'
// for more than one just add it in a new line ie.
// exclude group: '<first part till : symbol>', module: '<second part between : symbol and version>'
}
Read this article here if you want to dig further regarding dependencies of dependencies issue.
You must be seeing red line like this right? hover your mouse pointer on red line and you will see dialog like this. find which libraries are still old (in my case it was cardview) add that library's latest version in gradle and your issue may be solved.
If still it doesn't then I am seeing that you are using old Firebase libraries, update them to latest too.
The error message is pretty clear, "All com.android.support libraries must use the exact same version specification". For example, you have this:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-core:16.0.7'
You are trying to build 2 different versions, 16.0.1 and 16.0.7, of the same library. This can lead to runtime crashes. Choose which version you want to keep and delete the other. For example, if you want the version 16.0.7, replace these two lines with:
implementation 'com.google.firebase:firebase-core:16.0.7'
I'm having a conflict in libraries and failing to resolve it and the error is always
Multiple dex files define Lorg/apache/http/impl/client/DefaultRequestDirector;
The project compiles and runs if I don't implement the jackson2 and Robospice libraries, however, I need so what to do.
here's my gradle
dependencies {
implementation files('libs/speedchecker-android-sdk-1.3.jar')
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.code.gson:gson:2.8.4'
implementation 'com.squareup.okhttp:okhttp:2.5.0'
implementation 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-gcm:15.0.1'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'info.hoang8f:android-segmented:1.0.6'
implementation 'com.google.code.ksoap2-android:ksoap2-android:2.6.0'
testImplementation 'junit:junit:4.12'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
implementation('com.google.http-client:google-http-client-jackson2:1.19.0') {
exclude module: 'commons-io'
exclude module: 'xpp3'
exclude group: 'stax'
}
implementation('com.octo.android.robospice:robospice-google-http-client:1.4.14') {
exclude module: 'commons-io'
exclude group: 'org.apache.commons'
}
}
After trying for several hours, I noticed that the conflict is resulting from the following 3 (the two libraries came with the speed test jar file library when i bought it, so after upgrading the build tools the conflict occurred)
implementation files('libs/speedchecker-android-sdk-1.3.jar')
implementation('com.google.http-client:google-http-client-jackson2:1.19.0') {
exclude module: 'commons-io'
exclude module: 'xpp3'
exclude group: 'stax'
}
implementation('com.octo.android.robospice:robospice-google-http-client:1.4.14') {
exclude module: 'commons-io'
exclude group: 'org.apache.commons'
}
change gradle.property and multidexenable= true;
org.gradle.jvmargs=-Xmx1024m
compile 'com.android.support:multidex:1.0.1'
and also include
multiDexEnabled true
it seems like you're mixing libraries that shouldn't be mixed
looking at your build file these libraries are conflicting:
firebase contains both versions 16.0.1 and 17.1.0 which are conflicting and;
there are dependencies to both firebase and gcm (version 15.0.1 ) which are also conflicting
get rid of those and it should build without issues
While updating the google-play-services libraries used in my React Native Android project, upon building I'm getting this error:
The library com.google.android.gms:play-services-base is being
requested by various other libraries at [[15.0.1,15.0.1]], but
resolves to 10.2.4. Disable the plugin and check your dependencies
tree using ./gradlew :app:dependencies.
But when I run ./gradlew :app:dependencies there is no mention of version 10.2.4 of any library.
Here is the dependencies section of my build.grade:
implementation project(':react-native-cookies')
implementation(project(':react-native-google-places')) {
exclude group: 'com.google.android.gms';
}
implementation(project(':react-native-maps')) {
exclude group: 'com.google.android.gms';
}
implementation(project(':react-native-fbsdk')) {
exclude(group: 'com.facebook.android', module: 'facebook-android-sdk');
exclude group: 'com.android.support';
}
implementation 'com.facebook.android:facebook-android-sdk:4.22.1'
implementation(project(':tipsi-stripe')) {
exclude group: 'com.android.support';
exclude group: 'com.google.android.gms';
exclude group: 'com.google.firebase';
}
implementation(project(':react-native-camera')) {
exclude group: 'com.android.support';
exclude group: 'com.google.android.gms';
}
implementation(project(":react-native-google-signin")){
exclude group: "com.google.android.gms";
}
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.android.support:support-core-utils:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.google.android.gms:play-services-wallet:15.0.1'
implementation 'com.google.android.gms:play-services-base:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.google.android.gms:play-services-vision:15.0.2'
How can I resolve this issue? Thank you
EDIT: I noticed that my react-native-google-places dependency was behind a version, and after updating it the error message has changed to:
The library com.google.android.gms:play-services-base is being requested
by various other libraries at [[15.0.1,15.0.1]], but resolves to
11.6.2.
Looking at the build.gradle for react-native-google-places reveals that it is indeed including com.google.android.gms:play-services-base:11.6.2, but I would have expected the dependency to be excluded due to the exclude group: in my app's build.gradle (see above).
I have used Firebase UI to implement authentication in a couple of projects before, however, for some reason, I cannot get Facebook authentication to work in this current project. Each time the Sign in with Facebook button is clicked, it initiates what appears to be an authentication flow and then comes back to the Auth UI screen without doing anything.
No account is created in Firebase console and nothing is logged on Facebook. Here are the steps that I have taken and double checked.
Added Firebase UI latest library to project - 2.2.0
Add Facebook Android SDK
Updated other Firebase libraries to 11.4.0
Ensured Google Play services is 3.0.0
Ensured Facebook authentication is enabled in Firebase console
Ensured Facebook App ID and App Secret is added to Firebase console
Ensure Firebase oAuth redirect is added to Facebook
Ensure App is added correctly to Facebook and enabled
Ensure Facebook App Id is added to res/string resource file
Used a different Facebook account that is different from my
developer account
Tried on two different physical devices
There is no error message, no Log cat, what else could I be missing? Any help will be appreciated Here is my AuthUiActivity
https://gist.github.com/valokafor/d4d5663bcdcf999be1cd41f331a3b883
And here is my Gradle dependencies
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestCompile('com.android.support.test.espresso:espresso-contrib:2.2') {
// Necessary to avoid version conflicts
exclude group: 'com.android.support', module: 'appcompat'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'support-annotations'
exclude module: 'recyclerview-v7'
}
compile('org.mnode.ical4j:ical4j:1.0.6') {
exclude group: 'commons.io'
}
compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:design:$rootProject.supportLibraryVersion"
compile "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:support-vector-drawable:$rootProject.supportLibraryVersion"
compile "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:support-v4:$rootProject.supportLibraryVersion"
compile('com.mikepenz:materialdrawer:5.9.1#aar') {
transitive = true
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.afollestad.material-dialogs:core:0.9.4.5'
compile 'com.google.android.gms:play-services-auth:11.0.4'
compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-ads:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.firebaseui:firebase-ui:2.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'be.billington.calendar.recurrencepicker:library:1.1.1'
compile 'org.ocpsoft.prettytime:prettytime:3.2.7.Final'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'commons-io:commons-io:2.5'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'com.afollestad:material-camera:0.4.4'
compile 'com.google.android:flexbox:0.2.5'
compile 'com.github.fiskurgit:ChipCloud:3.0.3'
compile 'com.github.adroitandroid:ChipCloud:2.2.1'
compile 'com.facebook.android:facebook-android-sdk:4.22.1'
compile 'com.google.code.gson:gson:2.8.1'
testCompile 'junit:junit:4.12'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
}
apply plugin: 'com.google.gms.google-services'
Firebase Auth Console
It turns out, it was a very simple thing.
The Facebook id should be added to the string like this:
<string name="facebook_application_id" translatable="false">98765xxxxxxx</string>
instead of the way appears in the Firebase UI doc like this
<string name="facebook_app_id" translatable="false">987565xxxxxx</string>
Once I made that update, thanks to this question FirebaseUI Authentication with Facebook not logging in the issue was resolved