Log in or register to post comments

App Chrashes After Starting

May 7, 2012 - 5:18pm #1

i need help again :-)
Evreytime i try build an app it closes right after the screen is getting dark and a message appears. Which says something like "sadly your app is closed" (Translation from German Android version).
Even when i try to Build one of the sample app´s "Frame Markers" for example
The device is a Samsung Galaxy Nexus

Android version 4.0.4
Vuforia version: 1.5.9

Thanks, Ihno

Re: App Chrashes After Starting

May 8, 2012 - 1:06pm #9

This is the culprit..

05-08 07:17:05.828: E/AndroidRuntime(3157): FATAL EXCEPTION: main
05-08 07:17:05.828: E/AndroidRuntime(3157): java.lang.NoSuchMethodError: com.unity3d.player.UnityPlayer.windowFocusChanged
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at com.qualcomm.QCARUnityPlayer.QCARPlayerSharedActivity.onWindowFocusChanged(QCARPlayerSharedActivity.java:345)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at com.qualcomm.QCARUnityPlayer.QCARPlayerNativeActivity.onWindowFocusChanged(QCARPlayerNativeActivity.java:77)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2366)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at android.view.View.dispatchWindowFocusChanged(View.java:5735)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:851)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2557)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at android.os.Handler.dispatchMessage(Handler.java:99)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at android.os.Looper.loop(Looper.java:137)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at android.app.ActivityThread.main(ActivityThread.java:4424)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at java.lang.reflect.Method.invokeNative(Native Method)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at java.lang.reflect.Method.invoke(Method.java:511)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-08 07:17:05.828: E/AndroidRuntime(3157): 	at dalvik.system.NativeStart.main(Native Method)

Be sure that you're using the most recent release of the Android Extension from https://ar.qualcomm.at/qdevnet/sdk . There was a beta release that had problems w/ ICS.

Re: App Chrashes After Starting

May 7, 2012 - 10:30pm #8

oh... something is gone wrong... :) Take this file:o

Re: App Chrashes After Starting

May 7, 2012 - 10:19pm #7

Ok, here it is.
I hope it helps :)

Re: App Chrashes After Starting

May 7, 2012 - 10:04pm #6

OK. So you are using the Unity Extension, and not the native Android SDK.
In that case, you should build and run from Unity.

Try opening Eclipse before you attempt to build from Unity. Your device should appear in the DDMS view. If you click on the Device identifier, this will present any log messages from your build & run session in the LogCat panel. Please post these. They'll help to debug your problem.

* In the LogCat panel you can add a 'Unity' filter by clicking the plus sign ( Add a new logcat filter ) to isolate messages specific to Unity.

Re: App Chrashes After Starting

May 7, 2012 - 9:15pm #5

Ok... This works... but i dont know how i can build my Projekt like this...
I always build out of Unity... If i try Eclipse tells me:

Choose a valid Android code directory
(AndroidManifest.xml not found in XXXXXX.)

Unity´s build´s are still closing...

Re: App Chrashes After Starting

May 7, 2012 - 7:06pm #4

You should confirm that you have set-up your Android environment properly. See the Getting Started - SDK section here - https://ar.qualcomm.at/qdevnet/sdk

The guide will walk you through the set-up and how to verify your installation. It will also explain how to build the shared libraries using ndk-build.

Re: App Chrashes After Starting

May 7, 2012 - 6:27pm #3

he said that he dont know the Logcat.txt commant... But i think copy/paste will do it as well:

C:\Program Files (x86)\Android\android-sdk\platform-tools>adb -d
Android Debug Bridge version 1.0.29

 -d                            - directs command to the only connected USB devic
                                 returns an error if more than one USB device is
 -e                            - directs command to the only running emulator.
                                 returns an error if more than one emulator is r
 -s <serial number>            - directs command to the USB device or emulator w
                                 the given serial number. Overrides ANDROID_SERI
                                 environment variable.
 -p <product name or path>     - simple product name like 'sooner', or
                                 a relative/absolute path to a product
                                 out directory like 'out/target/product/sooner'.

                                 If -p is not specified, the ANDROID_PRODUCT_OUT

                                 environment variable is used, which must
                                 be an absolute path.
 devices                       - list all connected devices
 connect <host>[:<port>]       - connect to a device via TCP/IP
                                 Port 5555 is used by default if no port number
is specified.
 disconnect [<host>[:<port>]]  - disconnect from a TCP/IP device.
                                 Port 5555 is used by default if no port number
is specified.
                                 Using this command with no additional arguments

                                 will disconnect from all connected TCP/IP devic

device commands:
  adb push <local> <remote>    - copy file/dir to device
  adb pull <remote> [<local>]  - copy file/dir from device
  adb sync [ <directory> ]     - copy host->device only if changed
                                 (-l means list but don't copy)
                                 (see 'adb help all')
  adb shell                    - run remote shell interactively
  adb shell <command>          - run remote shell command
  adb emu <command>            - run emulator console command
  adb logcat [ <filter-spec> ] - View device log
  adb forward <local> <remote> - forward socket connections
                                 forward specs are one of:
                                   localabstract:<unix domain socket name>
                                   localreserved:<unix domain socket name>
                                   localfilesystem:<unix domain socket name>
                                   dev:<character device name>
                                   jdwp:<process pid> (remote only)
  adb jdwp                     - list PIDs of processes hosting a JDWP transport

  adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
                                 ('-l' means forward-lock the app)
                                 ('-r' means reinstall the app, keeping its data
                                 ('-s' means install on SD card instead of inter
nal storage)
  adb uninstall [-k] <package> - remove this app package from the device
                                 ('-k' means keep the data and cache directories
  adb bugreport                - return all information from the device
                                 that should be included in a bug report.

  adb backup [-f <file>] [-apk|-noapk] [-shared|-noshared] [-all] [-system|-nosy
stem] [<packages...>]
                               - write an archive of the device's data to <file>
                                 If no -f option is supplied then the data is wr
                                 to "backup.ab" in the current directory.
                                 (-apk|-noapk enable/disable backup of the .apks
                                    in the archive; the default is noapk.)
                                 (-shared|-noshared enable/disable backup of the
                                    shared storage / SD card contents; the defau
lt is noshared.)
                                 (-all means to back up all installed applicatio
                                 (-system|-nosystem toggles whether -all automat
ically includes
                                    system applications; the default is to inclu
de system apps)
                                 (<packages...> is the list of applications to b
e backed up.  If
                                    the -all or -shared flags are passed, then t
he package
                                    list is optional.  Applications explicitly g
iven on the
                                    command line will be included even if -nosys
tem would
                                    ordinarily cause them to be omitted.)

  adb restore <file>           - restore device contents from the <file> backup

  adb help                     - show this help message
  adb version                  - show version num

  adb wait-for-device          - block until device is online
  adb start-server             - ensure that there is a server running
  adb kill-server              - kill the server if it is running
  adb get-state                - prints: offline | bootloader | device
  adb get-serialno             - prints: <serial-number>
  adb status-window            - continuously print device status for a specifie
d device
  adb remount                  - remounts the /system partition on the device re
  adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
  adb reboot-bootloader        - reboots the device into the bootloader
  adb root                     - restarts the adbd daemon with root permissions
  adb usb                      - restarts the adbd daemon listening on USB
  adb tcpip <port>             - restarts the adbd daemon listening on TCP on th
e specified port
  adb ppp <tty> [parameters]   - Run PPP over USB.
 Note: you should not automatically start a PPP connection.
 <tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
 [parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
  <localdir> can be interpreted in several ways:

  - If <directory> is not specified, both /system and /data partitions will be u

  - If it is "system" or "data", only the corresponding partition
    is updated.

environmental variables:
  ADB_TRACE                    - Print debug information. A comma separated list
 of the following values
                                 1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
  ANDROID_SERIAL               - The serial number to connect to. -s takes prior
ity over this if given.
  ANDROID_LOG_TAGS             - When used with the logcat option, only these de
bug tags are printed.

C:\Program Files (x86)\Android\android-sdk\platform-tools>logcat.txt
Der Befehl "logcat.txt" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Program Files (x86)\Android\android-sdk\platform-tools>

EDID: I dont know what ndk-build means:o

Re: App Chrashes After Starting

May 7, 2012 - 5:58pm #2

To confirm, are you running ndk-build on the samples before attempting to install them?

Can you provide a log file of your build and run session? - you can get this from Eclipse or via ADB ( adb logcat -d > logcat.txt ) from a command line.

Log in or register to post comments