Log in or register to post comments

Crash on Start button in sample

February 25, 2014 - 8:25am #1

Hi,

I tried importing several of the samples in android studio and everything went smooth untill the press of the start button, the problem is that when i press the start Button the app makes a white screen and then it shuts down, but i don't get a crash dialog.

This happened in all of the samples i tried,do you know where could the problem be ?

After the tutorial on the site i've also followed this tutorial :http://software.techassistbox.com/use-vuforia-sample-on-android-studio_65921.html

but the ndk-build command says"no module found for...."

also android-studio logs the following error "02-25 18:23:28.659  24917-24917/com.qualcomm.vuforia.samples.VideoPlayback E/qdutils﹕ FBIOGET_FSCREENINFO failed"

 

Thanks,

Adrian

Crash on Start button in sample

March 2, 2017 - 4:12am #12

W/ActivityManager: Force removing ActivityRecord{7c7f26e u0 com.vuforia.samples.VuforiaSamples/.app.TextRecognition.TextReco t2871}: app died, no saved state



03-02 17:36:10.978 27511-27549/? W/WindowManager: Failed looking up window

Crash on Start button in sample

June 5, 2014 - 1:30am #11

Thanks dwmccandless for sharing your solution. I have added your notes to the article in here:

https://developer.vuforia.com/forum/android/using-android-studio-vuforia

 

Crash on Start button in sample

June 4, 2014 - 9:49am #10

To get this to work in Android Studio, I used the following from http://stackoverflow.com/questions/16683775/include-so-library-in-apk-in-android-studio:

I've tried the solution presented in the accepted answer and it did not work for me. I wanted to share what DID work for me as it might help someone else. I've found this solution here.

Basically what you need to do is put your .so files inside a a folder named lib (Note: it is not libsand this is not a mistake). It should be in the same structure it should be in the APK file.

In my case it was:
Project:
|--lib:
|--|--armeabi:
|--|--|--.so files.

So I've made a lib folder and inside it an armeabi folder where I've inserted all the needed .so files. I then zipped the folder into a .zip (the structure inside the zip file is now lib/armeabi/*.so) I renamed the .zip file into armeabi.jar and added the line compile fileTree(dir: 'libs', include: '*.jar') into dependencies {} in the gradle's build file.

This solved my problem in a rather clean way.

https://developer.vuforia.com/forum/android/using-android-studio-vuforia should be updated to include this information or to allow for questions and comments (or both).

Crash on Start button in sample

May 28, 2014 - 1:16pm #9

Thanks for the help on this. It seems like refreshing Eclipse was the issue I was having.

I actually need to get the example running in Android Studio, so I thought getting it working in Eclipse might help me, but I am still stuck with the following error in Android Studio: The library libVuforia.so could not be loaded

I have manually added libs/armeabi-v7a/libVuforia.so to the Android Studio project. The default import placed the Vuforia.jar file in src/main/java, so I tried moving it to libs/ thinking that might help, but I still get the same error.

The build.gradle file has the following (depending on which copy of the jar I am trying):

dependencies {
//    compile fileTree(dir: 'src/main/java', include: ['*.jar'])
    compile fileTree(dir: 'libs', include: '*.jar')
}
 
Any ideas on how to get this running in Android Studio?
 

Crash on Start button in sample

May 24, 2014 - 4:59am #8

libVuforia.so must be located under your project directory, under libs / armeabi-v7a / ... if you already copied there, that should be ok.

However, have you also added Vuforia.jar ? (You need both Vuforia.jar and libVuforia.so, as libVuforia.so is used by the JAR)

to add Vuforia.jar, go to Project > Properties > Java Build Path and add the Vuforia.jar in the Libraries tab. Also, in the Order and Export tab, check Vuforia.jar as well (so that it gets exported and packaged when the apk is built).

Also, make sure to always Refresh Eclipse whenever you make a change in the project settings.

 

 

Crash on Start button in sample

May 23, 2014 - 6:07pm #7

That's good to hear.

However, can you explain how the project works when I run it with the code in the samples directory within vuforia-sdk-android-2-8-8, but when I create a project in a different directory (and manually copy libVuforia.so to libs//armeabi-v7a)  I get the following error: The library libVuforia.so could not be loaded?

Crash on Start button in sample

May 23, 2014 - 12:37pm #6

libVuforia.so has no specific settings hard-coded... you don't need to rebuild it.  

 

Crash on Start button in sample

May 23, 2014 - 12:20pm #5

I had this problem initially even after manually copying libVuforia.so to the appropriate location. I have been able to get this to work by not checking "Copy projects into workspace" in Eclipse. So, it appears that libVuforia.so has something hardcoded. How do I get the project to initialize the Vuforia library appropriately if I want a setup with a project location that is not identical to the examples default location?

Does this require modifying something and rebuilding via NDK?

Crash on Start button in sample

March 24, 2014 - 1:23am #4

There is a file CopyVuforiaFiles.xml , change path (<fileset dir="C:/Users/ ..... /build/lib/armeabi-v7a"/>)  where is your  libVuforia.so  file, if this doesnt work for you then you should copy and paste this file to your project  in Android Studio , to folder: libs > armeabi-v7a > libVuforia.so

Crash on Start button in sample

February 25, 2014 - 9:39am #3

From windows console, what do you mean by outside Android Studio ?

Crash on Start button in sample

February 25, 2014 - 9:23am #2

Have you run the ndk-build from a command line (e.g. cygwin or windows console) ?

The ndk-build compiling should be handled outside of Android Studio.

 

Log in or register to post comments