Can anyone give me some instructions of how I'm supposed to install Vuforia in Android Studio? I'm making a new app and I need to use augmented reality with Vuforia. Hope you can help me!
Thanks a lot!
You need to follow following Steps:
Read our Getting Started Guide for instructions on setting up the
Java SDK, Android SDK and NDK:
https://developer.vuforia.com/downloads/sdk
Make sure you have installed the latest version available of Android
Studio from:
http://developer.android.com/sdk/index.html
Use the Android SDK Manager (from within Android Studio) to get the
latest Android SDK and Android Platform and Build tools
Launch Android Studio
Select File - > Import Project ... and browse to the root directory
of the sample Vuforia project you want to open
Proceed in the Import Wizard dialog (click Next, Next) until you
reach a page with this message:
"Alternatively, you can fill in the actual path map in the table below":
click to edit
enter the actual path to the Vuforia.jar library (which is located under your vuforia_install_dir/build/java/vuforia)
In the Project view, right-click on the Project and expand the view
hierarchy so to locate the Vuforia.jar under app > src > main
right-click on Vuforia.jar to open the context menu
click on the "Add as library..." option in the context menu
Alternatively, if you cannot locate the Vuforia.jar in your project
hierarchy:
right-click on the Project and select, "Open Module Settings"
select "App"
then select the "Dependencies" tab
Click on the "+" button to Add a File Dependency and browse to the
Vuforia.jar file
Create a folder called "jniLibs" under the "app/src/main" folder under your Android Studio project directory
Copy the "armeabi-v7a" folder (including the libVuforia.so file
located inside it) from the "vuforia_install_dir/build/lib" to the
"app/src/main/jniLibs" folder
the resulting directory structure under your project root should be:
/app
/src
/main
/jniLibs
/armeabi-v7a
/**libVuforia.so**
If your project includes a "jni" folder, move it to a location
outside of your project (otherwise Android Studio may attempt to
compile the sources in that folder and may fail)
Clean and rebuild the project
Run the app on your device
Best Luck :)
answer from here and work for me:
(Seems like the project needs access to the Vuforia.jar file and can't access it outside of the sample folder(?))
So,
copy the Vuforia.jar file from the folder \vuforia-sdk-android-x-x-x\build\java\vuforia to a folder in the sample project, e.g. to \samples\app\libs
(it's important it's in the "\app" path, so you can find it in the next step)
in Android SDK hit F4 (or right click on the app folder in the project structure and click on "Open Module Settings".
Select the tab "dependencies", click on the "+" to add a dependency and select "2 File dependency".
Now select the above path and file ((\samples\app) \libs\Vuforia.jar) and the project will run just fine...
Good luck.
Related
https://www.dropbox.com/developers/dropins/chooser/android
I am trying to use the android chooser in Android Studio but I not sure how to import it to my project and user it. I am using Android Studio, not Eclipse Android Studio if that has any relevance. I just have no idea how to being the unzipped file into use in my project.
It's more complex than it ought to be, but this procedure worked for more than just the Dropbox SDK.
Unzip the Dropbox Chooser SDK somewhere
Open your project in Android Studio
Create a new sub-directory "libraries" (right-click -> new -> directory)
Create a new module in the libraries directory (right-click -> new -> module)
In the "New Module" window, from "More Modules" select "Android Library"
Click Next
Edit "Library name" to "dropbox-chooser"
Edit module name to "dropbox-chooser"
Edit package name to "com.dropbox.chooser.android"
Click next until done
Navigate to "libraries/dropbox-chooser/src/main"
Delete everything within the "java" and "res" directories, but do not remove the directories
Navigate to the directory where you have unzipped the SDK
Copy everything in the "src" directory to the "java" directory of the new module
Replace the "res" directory in the new module, with the one from the SDK
Do the same with AndroidManifest.xml
Now, to reference the library in your main project:
Open/Create "settings.gradle" in your main project dir
Add include 'libraries:dropbox-chooser' to the file
In build.gradle, withing the dependencies section add compile project(':libraries:dropbox-chooser')
This should do the trick.
Sync, build, and all should be good.
The Dropbox developers page now includes documentation on how to use the Chooser SDK with Android Studio.
Basically, you create a module from the SDK, and then you add it as a dependency to your project.
Detailed steps are described here: https://www.dropbox.com/developers/dropins/chooser/android
I'm followed this IBM Worklight article instructions -
link.
On Eclipse - when I try to run BarcodeScannerSampleBarcodeScannerSampleAppAndroid -
I get message box with title - "Android Launch", that says:"Your projects contains error".
At Markers window I get this Error:
The container 'Android Dependencies' references non existing library
'D:\Users\MyUser\workspaceNew\CaptureActivity\bin\captureactivity.jar'
BarcodeScannerSampleBarcodeScannerSampleAppAndroid
Build path
Build Path Problem
Directory - "D:\Users\MyUser\workspaceNew\CaptureActivity\bin\" doesn't contains "captureactivity.jar" file.
Any idea?
Thanks!
Make sure you follow the instructions in the blog post to the letter.
It sounds like you did not follow the last step, which says to:
Right-click the generated Android project and select Properties
In the Android entry from the left pane, click on Add and select CaptureActivity
Fuller steps:
Download & extract the zip from GitHub: https://github.com/phonegap-build/BarcodeScanner/archive/master.zip
In Eclipse, File > Import > Android > Existing Android Code Into Workspace
Click on Browse and then find the extracted folder
Navigate in it into ../BarcodeScanner-master/src/android/LibraryProject and click Finish
Then you need to continue with creating the Worklight project. It's two different projects.
In your Worklight project, you need to navigate to your-project\apps\your-app\android\native
There you need to right-click on the src folder and select Import... > General > File System
Navigate to the same extracted folder, into ../BarcodeScanner-master/src/android and click Next
Tick the checkbox next to the android option that will appear after step 3
Next you need to configure AndroidManifest.xml and config.xml in the same location (your-app\android\native).
In both the CaptureActivity AndroidManifest.xml and the Worklight project AndroidManifest.xml I've set the minSdkVersion to 19, which I have installed.
Now,
Once you're done with that, build the project.
Right-click on the generated Android project > Properties > Android
Click the Add... button and select the CaptureActivity library
Make sure to not select the "Is library" checkbox.
Looks like you missed one step.
- First we need to import the Java facade to the plugin. This is the code that implements the
mandatory CordovaPlugin class and the exec() method. In the Worklight project, go to the
location for the Java code
BarcodeScannerSample/apps/BarcodeScannerSampleApp/android/native/src
- Right-click on the src folder and select Import...> File System
- Select the directory
<GIT CLONE FOLDER>/BarcodeScanner/src/android
Select File > Import, of type File System, the contents of the com folder from the same
source folder
<GIT CLONE FOLDER>/BarcodeScanner/src/android
You should be able see that the com.phonegap.plugins.barcodescanner.BarcodeScanner.java
file has beenimported into the src folder.
And make sure you configured the config.xml and AndroidManifest.xml properly.
You can find the file here: https://github.com/phonegap-build/BarcodeScanner/
Click on "Clone in Desktop".
Extract the zip file.
Import the resources as following.
https://www.ibm.com/developerworks/community/blogs/WASFAQs/resource/BLOGS_UPLOADED_IMAGES/scan_importplugin.jpg
Yaniv thanks.
The problem was in CaptureActivity library.
After importing "Existing Android Code Into Workspace", I should BUILD the project library.
Then it create a directory - "D:\Users\MyUser\workspaceNew\CaptureActivity\bin\" with "captureactivity.jar" file in it.
Thanks!
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
Here is how I run a Vuforia Sample on Android Studio on Window 8
Download, extract sample, remove files .project and project.properties
On Android Studio : Import project, next, next ...
Download & install android NDK http://developer.android.com/tools/sdk/ndk/index.html
Download & install cygwin http://cygwin.com/
Edit the file jni/Android.mk
LOCAL_SRC_FILES = C:/Vuforia-sdk/build/lib/$(TARGET_ARCH_ABI)/libQCAR.so
LOCAL_EXPORT_C_INCLUDES := C:/Vuforia-sdk/build/include
where Vuforia-sdk is your vuforia sdk
Open cmd in your project folder and do "ndk-build"
In android studio, click on project structure, modules, "YourModuleName", Dependencies, add jars, select the correct path to vuforia sdk for me it was :
C:\Vuforia-sdk\build\java\QCAR\QCAR.jar
build & run your project in Android Studio
Have fun!
*Don't forget the PATH variable for the ndk & cygwin
Read our Getting Started Guide for instructions on setting up the Java SDK, Android SDK and NDK:
https://developer.vuforia.com/resources/dev-guide/getting-started-android-native-sdk
Make sure you have installed the latest version available of Android Studio from:
http://developer.android.com/sdk/index.html
Use the Android SDK Manager (from within Android Studio) to get the latest Android SDK and Android Platform and Build tools
Launch Android Studio
Select File - > Import Project ... and browse to the root directory of the
sample Vuforia project you want to open
Proceed in the Import Wizard dialog (click Next, Next) until you reach a page with this message:
"Alternatively, you can fill in the actual path map in the table below":
click to edit
enter the actual path to the Vuforia.jar library (which is located under your vuforia_install_dir/build/java/vuforia)
In the Project view, right-click on the Project and expand the view hierarchy so to locate the Vuforia.jar under app > src > main
right-click on Vuforia.jar to open the context menu
click on the "Add as library..." option in the context menu
Alternatively, if you cannot locate the Vuforia.jar in your project hierarchy:
right-click on the Project and select "Open Module Settings"
select "App"
then select the "Dependencies" tab
Click on the "+" button to Add a File Dependency and browse to the Vuforia.jar file
Create a folder called "jniLibs" under the "app/src/main" folder under your Android Studio project directory
Copy the "armeabi-v7a" folder (including the libVuforia.so file located inside it) from the "vuforia_install_dir/build/lib" to the "app/src/main/jniLibs" folder
the resulting directory structure under your project root should be:
/app
/src
/main
/jniLibs
/armeabi-v7a
libVuforia.so
Clean and rebuild the project
Run the app on your device
Try this,
Exporting Eclipse Project with vuforia into Android Studio, which worked for me.
Below are the steps which i followed to the project work fine in Android Studio.
Export the Eclipse project from Eclipse as a Gradle project.
Go to the welcome to android studio window in android studio.
Click on Import Non android studio project.
Locate the project that you exported from eclipse, expand it and select the build.gradle file and click ok.
Copy the vuforia.jar file from the vuforia sdk.
Right click on the project in android studio and click on Show in Explorer option.
Locate the libs folder and paste the copied vuforia.jar file.
Make a folder lib ( NOTE: it is not libs) in the same structure as APK file.
Make another folder armeabi inside lib folder.
Copy .so files and paste it inside armeabi folder. and zip the lib folder into lib.zip
Rename the lib.zip to armeabi.jar
Include the armeabi.jar inside libs folder.
Then clean build and run the project.
I'm following this guide:
https://stackoverflow.com/a/10888882/1943607
Follow the steps below to add HoloEverywhere
Download Zip from GitHub to your computer UnZip the folder Go to
eclipse and choose File->New-> Android Project
Select Create project from existing source and then browse to the HoloEverywhereLib folder
inside extracted folder
Press Finish
Right click on the newly created project and go to Properties. Under the Android heading, you should see a section for Library with a checkbox IsLibrary. Make sure that's checked and press Add and previously added library ActionBarSherlock.
I unzipped the folder. Then went to eclipse -> Right click -> Import -> Android -> Existing Android Code into Workspace.
I select the unzipped folder and It's showing this:
When I click Finish:
And then if I create a new project, and try to import it, It cant find the library; I type org. and it isn't showing up the rest (org.holoeverywhere.app.***Activity). (Like its github says https://github.com/Prototik/HoloEverywhere#how-to-use-maven)
Can you help me out?
Edit: I've also tried to remove src from .classpath files with same result
Clone the repository using Github desktop. Install eGit on Eclipse. Then use import-->Git-->Projects from Git.
I am following the Vuforia and I have run the samples, It's working fine but if I want to start the our own app so could you help me how to start the app.
Thanks.
Please follow the below steps to integrate vuforia with your android project.
1)copy vuforia.jar and armeabi-v7 folder that contains libvuforia.so and paste it on your libs folder of your project.
2)right click on your android project and go to build path>cofigure build path and select libraries tab and add vuforia.jar file.
this will work now you can easy to use vuforia functions.
if you want to create your own marker then you have to log in in https://developer.vuforia.com/targetmanager and create project and then download .xml file and .dat file and then integrate that file with your android project
For Android Studio 2.3.3
1. Copy vuforia.jar and libvuforia.so in your libs folder
2. In your app, right click and select open module settings
3. Click On the dependencies and '+' sign to add "jar dependency"
4. Select vuforia.jar and click Ok
Done!