I found a tutorial to implement pull-to-refresh on android app and it says edit your build.gradle file and add the dependencies so it can use the android support library but I couldn't find the build.gradle file where can I find it? And I am using Eclipse.
Google ends the eclipse supports, so it's time to move on Android Studio.
To add dependency in Project, first of all you need to convert eclipse project into the Android Studio project.
https://developer.android.com/studio/intro/migrate.html
After that you can find the build.gradle file in app folder of the project, there you can add dependency for any other supported library.
Google officially declared some years ago that may not be introduced new feature.
Reference url please visit here to learn about android studio
https://developer.android.com/studio/intro/migrate.html
Gradle is just a plugin you can add it in eclipse and build your project using it similar to android studio
you can refer this tutorial to add gradle to your project
Note: It is recommended to use Android studio for android app development as it is google's official IDE for Android app development https://developer.android.com/studio/features.html
Related
I cloned this repository from github and opened it as a new project.
The project view shows no gradle and I cant run the provided samples.
How can I create or add a gradle to the project and run the samples?
The repository directory what you have mentioned is not an android project.
This is the URL for that wheel sample
Android-Wheel-Menu
and also it is developed in Eclipse. So better download it from browser. then load it from Android STUDIO.
What you cloned is not an Android application but a library for Android applications. Thus, it's not intended to be run standalone which is why you don't find a build.gradle. You need to create a new Android project and then follow the steps under "Usage" which explain how to integrate it in a project.
This library is marked as deprecated, so you might want consider using another one.
I have an android project that I can import to android studio. It opens but refuses to run. The file contains 4 folders (.idea, gen, java, res) and 2 files (AndroidManifest.xml and project.apk). I can't seem to run the app. When I import it, Android studio tells me "This project does not use the Gradle and migrate project to gradle.
Yes, Gradle is required for apps developed in or migrated to Android studio.
Android Studio’s build system is based on Gradle and uses build
configuration files written in Groovy syntax for ease of extensibility
and customization.
Since the whole build system is based on Gradle, you're stuck using it! Not a bad thing, Gradle is pretty great.
I have migrated quite a few projects to Android studio, for the most part it has been quick and painless.
There's a nice guide to help you migrate to Android Studio over at the Android development site: https://developer.android.com/studio/intro/migrate.html
I set up git in Android Studio
http://maxrohde.com/2014/08/18/import-github-project-to-android-studio/
Then imported this project
https://github.com/GautamGupta/Simple-Android-OCR
The following error was displayed:
Migrate Project to Gradle?
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.
What can I do to fix this?
That project hasn't been modified in two years, really four for most of the project, so it uses the older project layout and was very likely developed using Eclipse rather than Android Studio.
Here is the Google reference for migrating a project from Eclipse to Android Studio:
https://developer.android.com/sdk/installing/migrate.html
An option if simply importing doesn't work is to install Eclipse and do an export from there to Android Studio. While you could just work in Eclipse it is deprecated for Android development and you'll find many more up-to-date resources for Android Studio.
How do you import an Eclipse project into Android Studio now?
Android Studio's default build system is Gradle. That GiftHub project is not using Gradle build system. Probably created from Eclipse (Ant build system)
So when you open a project that does not use Gradle build in Android Studio, it will ask to convert the Project to Gradle based build. You just give yes on the popup, it will take care of everything.
http://gaut.am/making-an-ocr-android-app-using-tesseract/#comment-184181
here it explains solutions for gradle errors
That's not an error!
The recommended build system for android projects is gradle.
But the author of this project in github did it using only eclipse without any special build system.
You just need to answer "yes" to that popup message and Android studio will convert the project to use gradle
I was trying to add BetterPickers Library project to my app in android Studio.
Unfortunately the library I downloaded from Github at https://github.com/derekbrameyer/android-betterpickers doesn't provide a gradle.build file or the typical gradle project file structure... so I'm facing several problems while adding it...
Is there someone who used it ? Do I have to convert the project for Android Studio manually ?
Thanks
How can I add the facebook sdk to my android project in IntelliJ? I'm familiar with how to add a library project to an existing project in Eclipse, but not in IntelliJ. Anyone know how?
The answer below is outdated, please refer to the actual solution.
If it's just a jar, you can add it to the module dependencies.
If you want to use Android Library with source code, you need to create a new Module in IDEA with Android Facet and specify in the facet settings that it's Android Library Project. Configure module content and source roots and then add this module as a dependency to your Android application module.
Here are the screenshots for the Facebook SDK Android Module configuration in IDEA:
Note that the root of the module is set to the facebook subdirectory from the GitHub repository and Is Library Project checkbox is enabled.
If you add this module as a dependency to your application, everything should build fine.
I've also uploaded a sample project that consists of simple sample provided with the SDK and this facebook API module as a dependency, you can download and use it for reference.
Remove if inappropriate - but this solution was much more relevant for the latest version of IDEA and the latest Facebook SDK: https://stackoverflow.com/a/14732898/1711200
Tested with IDEA 12.1.2 and Facebook SDK 3.0.1
My reason for posting this is because the directory structure for the latest Facebook SDK is different & makes this post outdated. I also kept getting directed to this thread, whereas the thread I've linked to is a better & more relevant solution.