I cannot find my build.gradle project file to add dependency only my android studio contains 1 module build.gradle but cannot find the other one to add dependency.
i need to add the google vision dependency in my project but i am not getting where to write the dependency code
like
compile 'com.google.android.gms:play-services-vision:11.0.4'
can please anyone help me out regarding this problem
You can create a new project and then copy it from there
Related
I created one library project with two modules. I added the 2nd module in the dependencies of the first module like this:
implementation project(":module2")
I am able to generate the AAR file after this. But I'm getting
java.lang.NoClassDefFoundError
while running the client app.
Kindly help me find out what I am missing here.
In your first module build.gradle file, you can include like ,
api project(":module2")
I don't know if Im understanding it right, but how do i make a project become addable on android gradle's dependency, more like facebook's sdk where we add compile 'com.facebook.....'. I'm new to this topic so please guide me. Thanks.
If you want to add another gradle project in your current one. (assuming it is inside the current projects root directory)
in settings.gradle file add
include ':name-of-the-dir-of-the-project-you-want-to-include'
in build.gradle
dependencies {
compile project(':name-of-the-project-you-want-to-include')
}
I don't understand how to add a library in my new project.
https://github.com/txusballesteros/bubbles-for-android
I saw similar posts but I don't get the library in my project.
Error:Configuration with name 'default' not found.
And when I add the library can I change the original source code and can I use it because I read about the same License ?
Please help me, I was trying many methods and I failed.
Locate your build.gradle file:
Go to android view (easiest this way)
Locate Gradle Scripts folder:
Locate your correct build.gradle file (watch it, there are 2 of those who look similar):
Add the this statement (compile 'com.txusballesteros:bubbles:1.2.1') according to picture:
Good to go
Add the library dependency in your app level build.gradle file(not project level). you don't need to download any library file just add this dependency and sync the project
dependencies {
...
compile 'com.txusballesteros:bubbles:1.2.1'
}
Add following to your Build.Gradle under dependency block and then sync. project. Now you can use that library methods in your code.
compile 'com.txusballesteros:bubbles:1.2.1'
I tried to add google-play-services.jar to my project but I faced with this err.Why? (Error:Cannot change configuration ':android:compile' after it has been resolved.)
Does anybody know a way to resolve this problem?
In android studio you don't need to add jar files, Remove the jar file and
Open the build.gradle file inside your application module directory.
Note: Android Studio projects contain a top-level build.gradle file and a build.gradle file for each module. Be sure to edit the file for your application module
Add a new build rule under dependencies for the latest version of play-services. For example:
dependencies {
compile 'com.google.android.gms:play-services:7.8.0'
}
Save the changes and click Sync Project with Gradle Files in the toolbar.
Here's official link
I want to create an EditText that could pick date and time at the same time. I found this library but I failed build this library. It says
Error:(31, 0) Project with path ':slideDateTimePicker' could not be found in project ':app'
According to the grade.build file, it looks like we should have this library as a project first. Here is the dependencies that I should add
compile project(':slideDateTimePicker')
How should I add this library into my project? Thank you.
Use this on your gradle:
compile 'com.github.jjobes:slideDateTimePicker:1.0.2'
You need to add library files to your project directory as well. Also add
this line to settings.gradle:
include 'your-library-directory'
There are two approaches. First approach, if you want to use the library out-of-the-box without source code changes. Second, if you want to modify the source code later on.
As dependency on app level; add the following line in your build.gradle file:
compile 'com.github.jjobes:slideDateTimePicker:1.+'
Add as a sub-project to your existing project; add the slideDateTimePicker folder to your projects root folder:
under dependencies on app level build.gradle file add:
compile project(path: ':slideDateTimePicker')
and in your settings.gradle file add:
include ':slideDateTimePicker'
file-> input modle>SlideDateTimePicker, and then: project settings-> add modle->choice SlideDateTimePicker.
or
copy SlideDateTimePicker to you project root path. and add compile project(':slideDateTimePicker') in your build.gradle, add include ':slideDateTimePicker' in settings.gradle
Hope this can help you.