I am learning midtrans (payment gateway). I get this documentation. There is writen compile 'com.midtrans:uikit:$VERSION-SANDBOX'. What should i write in $VERSION-SANDBOX? I've search on google and ask people but no result. I try to write compile 'com.midtrans:uikit:100' but not work :D.
You can see the latest Version of midtrans here. So it will be compile 'com.midtrans:uikit:1.5.1'
Related
Android Studio and Google Maps dependencies have finally defeated me. I did have it working but had to change some things to get my app to use the correct API Key.
Now I click on run and it say's build successful, but it doesn't actually run the project on the simulator and it puts a whole load of red circles with white exclamation marks in the messages window. Nothing happens if you click on those circles and there's no explanation as to what they mean.
I've a feeling it's saying there are dependencies of the dependencies I've included but I've moved away from individual Play service includes and included the whole lot, with the whole support library and still nothing happens.
Can anyone tell me what's going on, or how I can fix this, or even where I look next to find out why this won't run.
These are my dependencies in my build.gradle.
dependencies {
compile files('libs/jackson-annotations-2.9.0.jar')
compile files('libs/jackson-databind-2.9.0.jar')
compile files('libs/jackson-core-2.9.0.jar')
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.android.support:appcompat-v7:25.2.0'
}
apply plugin: 'com.google.gms.google-services'
This is the error
This is where it says the build was successful
Thanks
Change compile 'com.google.android.gms:play-services:11.0.4' to compile 'com.google.android.gms:play-services-maps:11.8.0' // you dont need use all play-services
And try again!
I think that you have a dependency conflict, i suggest in this case to use the version 11.0.2:
compile 'com.google.android.gms:play-services:11.0.2'
btw, loading all the Play Services Library is not necessary to use Google Maps,
use only this dependency:
compile 'com.google.android.gms:play-services-maps:11.0.2'
I am upgrading an App, and in my build.gradle file, I have this:
dependencies {
..........
compile 'com.google.android.gms:play-services:9.8.0'
..........
}
In the Android SDK Setup Quickstart Guide Urban Airship provides, they offer this as a sample code:
dependencies {
..........
// Recommended for location services
compile 'com.google.android.gms:play-services-location:9.8.0'
..........
}
If I use "play-services:9.8.0" I would assume it would also include "play-services-location:9.8.0" because "play-services-location:9.8.0" should be a subset of "play-services:9.8.0", but I wanted to confirm. Do you know if this is a correct assumption? Thank you.
From Google Api Documentation
you can use the latest Google play service api:
dependencies {
compile 'com.google.android.gms:play-services:10.2.1'
}
If the number of method references in your app exceeds the 65K limit, your app may fail to compile. You may be able to mitigate this problem when compiling your app by specifying only the specific Google Play services APIs your app uses, instead of all of them.
To Selectively compiling APIs into your executable:
compile 'com.google.android.gms:play-services-maps:10.2.1'
compile 'com.google.android.gms:play-services-plus:10.2.1'
compile 'com.google.android.gms:play-services-location:10.2.1'
compile 'com.google.android.gms:play-services-games:10.2.1'
compile 'com.google.android.gms:play-services-gcm:10.2.1'
the detail lists are provided in the documentation.
Yes, play-services is the full bundle. They were broken apart to reduce the method count of your app so you don't hit the dex limit. More information can be found here.
I am developing my first app in android and I need some custom controls. So I want to know if I can use any github project in my app directly? If so then do I have have add any copyright or license information in my app anywhere? Also I want to know how I can use this below project in my app?
https://github.com/hdodenhof/CircleImageView
https://github.com/mutualmobile/CardStackUI
Note: The app which i am developing will be released as a commercial app
Thanks in advance,
IamHuM
CircleImageView readme, and CardStackUI readme both mention the right Gradle dependencies:
dependencies {
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.mutualmobile.android:cardstack:0.5.2'
}
That fits the Android basic project setup:
The most simple Android project has the following build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.1.0"
}
Add your own dependencies to your project.
If you looked at the README file carefully, you will find this:
dependencies {
...
compile 'de.hdodenhof:circleimageview:2.1.0'
}
That basically tells you how to install the library.
Go to your build.gradle file (Note that there are two of them, go to the one that says "Module: app"). Scroll to the very bottom and you'll see something like this:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.+'
}
Yours might be slightly different, but you get the idea :)
Now add the line you found in the README to here, so it becomes:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.+'
compile 'de.hdodenhof:circleimageview:2.1.0' // this line!
}
Now do a gradle sync by pressing on the top!
Just do the same thing with the other library!
You have the IDE answers above :) Regarding licences - any commercial app complies with licences, you must understand the licences of the projects you use, and give the appropriate credit accordingly, github projects are usually Apache 2, which in a nutshell means that you can use it freely, but must:
include a copy of the licence (Apache 2)
formally mention the usage of any third-party library you are using by name and by the licence it complies to.
Other licences have other meanings and some might even be unwanted - there are some licences that you would ABSOLUTELY NOT want to use on a client app, but can be used on server side mechanisms.
Read about BSD, GPL, LGPL, and when in doubt - seek legal help (make sure they specialize in exactly that - licencing).
The place to do it could be inside the setting.
(e.g. have a look at the facebook app, inside app settings->terms & policies->More Resources->Third Party Notices), or, depending on the nature of your app - even outside, if you need the user to agree to terms of service or anything else.
In a lot of apps this would usually mean a webview directing to a webpage with all the info, since it's a lot to put in your app and would bloat it.
Check under LICENCE.txt or in the README.txt that are published with the projects.
For more info, refer to The StackExchange OpenSource resources.
Remember - you are liable, and yes - that means someone can sue if you do not handle this properly.
"open source is free speech, not free beer" :)
good luck!
I'm trying to use the new Awareness API in an app but the only way that I can include it in my code is by using
compile 'com.google.android.gms:play-services:9.2.0'
in my gradle file.
I tried using
compile 'com.google.android.gms:play-services-awareness:9.2.0'
but it doesn't seem to exist.
Does anyone know what the correct compile path for selective compile of the awareness API is?
Thanks in advance.
It actually does exist.
//Awareness API
compile 'com.google.android.gms:play-services-contextmanager:9.2.0'
Today you have to include:
compile 'com.google.android.gms:play-services-awareness:10.2.4'
If you want to know the latest Dependency you can use my web tool called DependencyLookup.
I am using google play services API, and from old version of code, i included the whole library. Now i want to use Selectively compiling APIs from this link https://developers.google.com/android/guides/setup. But i can't find what does com.google.android.gms.appstate.AppStateManager come from .
I already have this
compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-identity:7.5.0'
compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'com.google.android.gms:play-services-games:7.5.0'
compile 'com.google.android.gms:play-services-plus:7.5.0'
but none of them have.
Please help.
The AppStateManager of the Google Play Services is DEPRECATED, so they have hidden the AppState play-services-dependency.
At the moment you can still get it via the following dependency, but it will probably get deleted soon.
compile 'com.google.android.gms:play-services-appstate:7.8.0'
or for Updated version use
implementation 'com.google.android.gms:play-services-appstate:8.4.0'
Add the following dependency in build.gradle rember this is for old DEPRECATED
compile 'com.google.android.gms:play-services-appstate:9.0.0'
This is work for me