I am having trouble using Gradle to build Facebook SDK 4.0.1 in Android Studio 1.2 beta. There is no compile error, but the compiled library is not in my External Libraries. Previously, I successfully had:
compile 'com.facebook.android:facebook-android-sdk:3.22.0'
However,
compile 'com.facebook.android:facebook-android-sdk:4.0.1'
doesn't appear to do anything. From searching, it looks like this version is available on maven. Here is my complete dependency list:
dependencies {
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.parse.bolts:bolts-android:1.2.0'
compile 'com.mixpanel.android:mixpanel-android:4.5.3#aar'
compile 'net.hockeyapp.android:HockeySDK:3.5.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:6.5.87'
//compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile project(':libraries:downloader_library')
compile project(':libraries:zip_file')
compile 'com.facebook.android:facebook-android-sdk:4.0.1'
testCompile 'junit:junit:4.12'
}
I also have had some difficulties with Google Play Services 7.0.0, hence the comment.
Is there something I am doing wrong, such as a missing dependency or an incorrect assumption?
Solved
It turns out you can't have comments in your dependencies, so removing
//compile 'com.google.android.gms:play-services:7.0.0'
Fixed the issue.
Related
I have this error:
I have enabled multidex but still it gives me multidex files define issues.
compile fileTree(include: ['*.jar'], dir: 'libs')
// Navigation Drawer Library
compile('com.mikepenz:materialdrawer:5.3.0#aar') {
transitive = true
}
// Debugger Tools libraries
debugCompile 'com.facebook.stetho:stetho:1.2.0'
debugCompile 'com.parse:parseinterceptors:0.0.2'
//Google, Inc (Play services) Libraries
compile 'com.google.android.gms:play-services-maps:9.2.0'
// Google, Inc (Support) Libraries
compile 'com.android.support:support-v13:25.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:multidex:1.0.1'
compile 'org.florescu.android.rangeseekbar:rangeseekbar-library:0.3.0'
// Parse Server API SDK
compile project(':ParseUI-Widget')
compile 'com.parse:parse-android:1.13.1'
compile 'com.parse.bolts:bolts-android:1.4.0'
compile 'com.github.tgio:parse-livequery:1.0.3'
compile 'com.parse:parsefacebookutils-v4-android:1.10.3#aar'
// Facebook, Inc SDKs
compile 'com.facebook.android:audience-network-sdk:4.18.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.facebook.android:account-kit-sdk:4.+'
// Libraries for loading images
compile 'com.facebook.fresco:imagepipeline-okhttp3:0.11.0+'
compile 'com.facebook.fresco:fresco:1.0.0'
// Location Helper Library
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
// Time library
compile 'joda-time:joda-time:2.9.7'
// Accelaration library
//compile 'com.neumob:neumob-android:3.2.4'
// Others
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile files('libs/mint-4.4.0.jar')
I have added build.gradle file.
I don't know how to solve Multidex issue in Android. My app has lots of SDKs integration, I went through lots of tutorials and blogs. I got so many solutions. One of them is below mentioned as part of my gradle.
apply plugin: 'com.google.gms.google-services'
classpath 'com.google.gms:google-services:3.1.1'
I have submitted my release apk to the Google Play console, however it was rejected due to a libpng security vulnerability. I have a couple of libraries I use in my app. How do I know which of these uses libpng?
I am using Android studio.
I am not using OpenCV as a library!
These are my dependencies in my build.gradle file:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile files('libs/sdk-v1.0.0.jar')
compile(name: 'pen-v4.1.0_full', ext: 'aar')
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
compile 'com.google.zxing:core:3.2.1'
compile files('libs/gson-2.3.jar')
compile files('libs/httpclient-4.4.jar')
compile files('libs/httpcore-4.4.jar')
compile files('libs/httpmime-4.3.6.jar')
}
Let me ask my question again:
How do I know which of these libraries uses libpng?
Use strings <youlibrary>.so | grep png. If you see output full of png_set_*, png_write_*, png_image_* - that library uses libpng.
Trying to update my firebaseui. But Why doesn't this work in my gradle file?
compile 'com.firebaseui:firebase-ui:0.4.0'
UPDATE
Still same problem.
My other dependicies ar also updated:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.google.maps:google-maps-services:0.1.12'
compile 'com.google.maps.android:android-maps-utils:0.4.3'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.firebase:firebase-simple-login:1.4.2'
compile "com.google.firebase:firebase-database:9.0.0"
compile 'com.firebaseui:firebase-ui:0.4.0'
Update:
The bug has been fixed and the new build is already pushed. Here's the last official reply from the bug post.
Ok I just pushed a fix for this. There will be some propagation delay.
If you can try it in >= 1hr and let me know if it works that
would be great. Just build your project with the gradle flag
--refresh-dependencies to make sure it re-downloads deps and does not use the cached copy.
FirebaseUI is moved to jCenter in 0.4.0, thus it can't be found in mavenCentral. If it's still giving error, try to add Database and Auth dependencies separately, like this
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.firebaseui:firebase-ui-auth:0.4.0'
This has been marked as a bug already here. You can read the bug post to read more about this issue.
Here's the official reply on the bug
Ok I'm glad that solved your problem. For what it's worth,
com.firebaseui:firebase-ui:0.4.0 is just an empty library that
declares dependencies on those libraries for convenience.
I will leave this issue open until I can figure out what's going on
with my jCenter configuration, thanks for the report!
For some reason 0.4.0 is not avaible through bintray or mavencentral..
0.3.1 works though, so try that for now. I will look into it later.
'com.firebaseui:firebase-ui:0.3.1'
maoke sure you are using Jcenter.
if compile 'com.firebaseui:firebase-ui-database:0.4.0' and
compile 'com.firebaseui:firebase-ui-auth:0.4.0' still not work for you, try to go to Settings-> Build,execution, Deployment -> and disable offline Work
In my project, when I try and add the latest design support library I get this error which appears to be in conflict with the wallet library:
D:\Android Stuff\ReleaseMEdia\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet\8.1.0\res\values\wallet_colors.xml
Error:(2) Attribute "rippleColor" has already been defined
Here is the list of all my gradle dependencies below:
compile 'com.google.android.gms:play-services-wallet:8.1.0'
compile 'com.google.android.gms:play-services-ads:7.8.0'
compile 'com.google.code.gson:gson:2.2.+'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.jakewharton:butterknife:5.1.2'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.balysv:material-ripple:0.9.0-SNAPSHOT#aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.6'
compile 'com.google.api-client:google-api-client-android:1.19.0'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.github.gabrielemariotti.cards:cardslib-core:2.0.1'
compile 'com.github.gabrielemariotti.cards:cardslib-cards:2.0.1'
compile 'com.github.gabrielemariotti.cards:cardslib-recyclerview:2.0.1'
compile 'se.emilsjolander:stickylistheaders:2.1.5'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.android.support:palette-v7:23.1.0'
compile 'com.nispok:snackbar:2.11.+'
compile 'com.uwetrottmann:trakt-java:4.3.1'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.android.support:customtabs:23.1.0'
compile 'com.android.support:multidex:1.0.0'
compile 'jp.wasabeef:picasso-transformations:1.2.1'
compile 'com.android.support:design:23.1.0'
Everything syncs fine until I add the design library at the bottom, then I am presented with this message when trying to sync gradle.
I've seen a few other people online with this issue but it doesn't look like anyone has a resolution yet. Can anyone provide any insight?
It looks like this has nothing to do with wallet, but instead is an issue with the version of com.balysv:material-ripple you are using as per this issue.
The library's Github page shows that the latest version (which includes the above fix) is:
compile 'com.balysv:material-ripple:1.0.2'
I am trying to clean up and update the libraries on a project. As part of this I moved from using the classic library folder dependency to one through gradle, for Google Play Services. I started getting an dexDebug error when compiling debug (see Android Studio - UNEXPECTED TOP-LEVEL EXCEPTION: ). From what I understand this error shows up if you have a double dependency somehow.
Below is the dependencies part of my gradle file. If I comment out appcompat-v7 completely, everything works fine. Does play-services already depend on appcompatv7 and automatically bringing it in or what's going on?
dependencies {
compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.maps.android:android-maps-utils:0.3'
//compile files('libs/commons-codec-1.8-sources.jar')
compile files('libs/engine.io-client-0.2.3.jar')
compile files('libs/ffmpeg.jar')
compile files('libs/Java-WebSocket-1.3.0.jar')
compile files('libs/socket.io-client-0.1.3.jar')
//compile files('libs/javacpp.jar')
compile files('libs/javacv.jar')
compile files('libs/json-simple-1.1.1.jar')
compile files('libs/opencv.jar')
//compile files('libs/twitter4j-async-4.0.2.jar')
compile files('libs/twitter4j-core-4.0.2.jar')
//compile files('libs/twitter4j-media-support-4.0.2.jar')
//compile files('libs/twitter4j-stream-4.0.2.jar')
}
It turns out there was an exact duplicate to this question:
After update of AS to 1.0, getting "method ID not in [0, 0xffff]: 65536" error in project
I fixed it by adding (this alone will fix the original problem):
defaultConfig {
...
multiDexEnabled true
}
and by cutting down on the massive Google Play Services, and using only subsets of it (this alone will also fix the original problem):
dependencies {
//compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.google.android.gms:play-services-maps:7.0.0'
compile 'com.google.android.gms:play-services-location:7.0.0'
compile 'com.google.android.gms:play-services-gcm:7.0.0'
compile 'com.google.android.gms:play-services-plus:7.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.maps.android:android-maps-utils:0.3+'
compile files('libs/engine.io-client-0.2.3.jar')
compile files('libs/ffmpeg.jar')
compile files('libs/Java-WebSocket-1.3.0.jar')
compile files('libs/socket.io-client-0.1.3.jar')
compile files('libs/javacv.jar')
compile files('libs/json-simple-1.1.1.jar')
compile files('libs/opencv.jar')
compile files('libs/twitter4j-core-4.0.2.jar')
}