I am trying to add gesture detection capabilities to my application, and I found the following library. However, in its instructions, it says the following:
I primarily use Eclipse for development therefore the instructions below are for Eclipse. I plan to add instructions for Android Studio later.
Clone the repo: git clone https://github.com/kritts/HandWave.git
Import TouchFreeLibrary as a library
Click File | Import | Android | Existing Android Code into Workspace
Select the TouchFreeLibrary project
Click Finish
Right-click on TouchFreeLibrary, then click Properties
In the project properties window, click the Android section
Check the Is Library checkbox
Add a reference to the TouchFreeLibrary project (click Remove to remove any broken references, then click Add to add the correct one)
You will also need to need to add OpenCV as a library. Detailed instructions on how to do so can be found here.
It's up to you which version of OpenCV you'd like to use (all of the recent versions should work just fine), but the 2.4.3 is the version I used during development.
However, I am not sure how this would work with Android Studio.
All answers are appreciated
Building off of my previous answer (which by the way I apologize for not going into more depth) the original HandWave project has been forked and modified and can now be implemented within Android applications. It can now be imported into Android projects just as you would import any other library. Note, however, that you will also need to download OpenCV. Detailed instructions on how to do so can be found at HandWave's repo.
There is now a version of HandWave that works on Android Studio. You will need to import OpenCV for Android as a library though, and change the OpenCV compile path in the Android Studio version of HandWave to the version of OpenCV that you imported.
https://github.com/Manishearth/HandWave/tree/androidstudio
Related
I made an android application using Android Studio during lectures at university. Then I uploaded the project to drive and when I got home, after I installed the latest Android Studio, I opened my project and almost every line of code was marked as libraries were not found.
I found that when developing on a computer I use android.support.v7.app.AppCompatActivity but it's not recognized at home. So I tried creating an empty project at home and I found it uses androidx.appcompat.app.AppCompatActivity.
A solution I tried, was to delete all imported libraries and then I let Android Studio to import what he needs, but it's stupid. I have to do that every time I switch the working station.
Why can't it be just one library? Is there other solution, not to re-import all the libraries?
Your problem is "uploaded the project to drive", that also saved the .idea folder where everything regarding the IDE and computer is stored. So you are opening a project on another computer with routes to your old computer. Solutions:
Close Android Studio and then delete the .idea and .gradle folder from the project, re-open it
File/Invalidate Cache and Restart
Recommended Solution Use a version control system like git. Android Studio does a pretty good job integrating with VCS. In the menus look for VCS/Enable Version Control Integration you need to install git previously and know how to use git.
There is another thing, the new AS version has a sync gradle icon, is an elefant with and arrow, sometimes big changes on gradle can go unnoticed so click it. There is also the usual, clean project or rebuild project.
The other part of the problem is: the different libraries. Androidx was introduced to consolidate in 1 library the support libraries. It is recommended to use it. If the latest version of Android Studio dont support it then you will have to, and also update the IDE on the other desktop
You can't mix AndroidX library with support library in modern android application development. support is already deprecated and AndroidX is future. So, migrate your existing project to AndroidX
With Android Studio 3.2 and higher, you can migrate an existing
project to AndroidX by selecting Refactor > Migrate to AndroidX from
the menu bar.
Check official documents for more information
my tries
click right at my project , choose Export ---> android
---> Generate Gradle build files
I stop in this point , I cant force overriding, any one know the reason
The Eclipse IDE uses a different file structure for their android projects, as opposed to the files structure of the projects created through Android Studio. Regardless of the Gradle builds and so on.
Your best bet would be to create a new Android Project based on the specifications of your Eclipse project. And migrate the source code as required. As far as the libraries are concerned, you can add them directly to the Android Project.
I also found that this might be useful for your current situation. Help on Migrating from Eclipse to Android Studio (Projects).
Hope this helps.
I had generated gradle files for a project created using Eclipse ADT. After Importing into Android Studio using the Import Gradle option, I am not able to use any of the classes present in the Android SDK for example the Button Manager.
The icon for my java files changed
Secondly, how can I merge two projects inside a single app ?
Please suggest me any link from where I can begin using Gradle?
I followed the tutorial from HoloEverywhere in the Git page:
Android Studio / IntelliJ IDEA
Checkout from Version Control - Git
Typo in Repository URL: https://github.com/Prototik/HoloEverywhere.git
Press 'Clone', wait until repository checkout
If you use Android Studio, then just click 'Yes' on the proposal to open a project. Otherwise in IDEA press Import project and specify path to downloaded repo, choose gradle model and press next.
Mark checkbox Use auto-import and click finish.
Kiss a Google and Android devs team!
Read this basic migration guide.
But I canĀ“t make it work. I try to use the same method like ABS, but it doesn't work.
Any suggestions to make it work?
Actually, it's quite easy. Just download the source code. Use Android Studio to import HoloEverywhere project by selecting the build.gradle file in the root folder and you are all set. Android Studio will build it automatically. If you want to run, then you have to setup Android Studio to do so, you can refer to Android Studio documentation.
How can I create an Android library project in NetBeans IDE? The build target would be a JAR for use in another Android project. I've seen the documentation at http://developer.android.com/guide/developing/projects/projects-eclipse.html for creating a library project in Eclipse, but I'm using NetBeans. I do not see an isLibrary property available in the properties for the Android project. If there is not a built-in way to accomplish this, how might I go about manually setting up an Android library project? Forgive me if this is a thick question.
Netbeans is using the standard android project layout (see the features site) and the standard ant-based build. This means that there is a project.properties file in the project's root. A library project has android.library=true in it, along with the android target version (and eventually other android library references). This file can be viewed and opened under Important Files. When cleaning and rebuilding, Netbeans behaves as if this is a lib project (does not create apk etc.)
Otherwise, you could use the SDK android tool (located in $SDK/tools) to generate the lib project on the cmdline and then try to import it into Netbeans somehow.