launch application in android emulator
Hello,
I work on vista. I installed, deinstalled, reinstalled. Titanium starts, I can build a new mobile project.
When the emulation is launched for the first time then it stops with the start screen. I unlock the phone. But no app is running. When I retry the lauch-button, the infowindow says:
[INFO] Building bbb for Android … one moment
[INFO] Copying project resources..
[INFO] Tiapp.xml unchanged, skipping class generation
[INFO] Manifest unchanged, skipping Java build
[INFO] Installing application on device
[INFO] Launching application … bbb
[INFO] Deployed bbb … Application should be running.
But still my app is not running. Do I make something wrong?
When I click on the phone screen I can add a shortcut to an application. Yes, there I can find my app, create the shortcut, click on the shortcut and then my app starts.
That's great, but I guess that's not the way it should work, right? How should it work? Should the app run in the emulation right after clicking the launch button? And if this is the case, how can I find out why titanium fails to do this?
The info window doesn't show anything when I switch the filter to error or warn. In the trace and debug mode infos are shown but I don't know how to interpret them. So I need help? What can I do? Thanks!
Rolf
2 Answers
-
Accepted Answer
I've experienced the issue with the app not running on launch but on older titanium dev clients. Are you running 1.2.1?
As you get into more development you'll find the info panel in the dev tool less helpful; it scrolls too easily as messages come in, the size is too small and it's hard to filter specific types of messages.
From the cmd line run "adb -e logcat" and you'll get the output from the emulator [-e] or the device [-d]. You'll have better control over how much/little you see and can filter the output more. Here's a primer on using adb http://developer.android.com/guide/developing/tools/adb.html. It's worth bookmarking & returning to as you get more into development on Android.
Understanding the log output will come with time & experience :) But a typical line from logcat - and the Ti Dev log panel looks like:
I/TiRootActivity( 2033): (Thread-16) [15,496] eval app.js
which is in the general form:
[Type]/[Source][(Process)]: [message]
- Type is the type of message: I - Info, D - Debug, etc
- Source is generally the name of the (Android) Activity or task which is generating the message. If you've not read it already - here's a handy primer on the basic makeup of Android apps http://developer.android.com/guide/topics/fundamentals.html. When working with Titanium you'll often see the source starting with Ti (Titanium), Kroll (A Titanium module that acts as a bridge between Java & JS) or with a name that you'll find in the API.
- Process is the process ID - you can usually ignore this or use it as a filter to show only messages from your app.
- Message varies a lot - Titanium messages tend to start with ([context]) [N,N] [Detail] where context is the context source of the message, N is some numbers & Detail is the detail of the message.
-
David, thanks a lot for the informations.
I thought it might be a good idea to start with updating the version because I run 1.0. I just reinstalled titanium 2 times completely because when trying to update 1.0 to a newer version I got the error message:
"Error: Missing installer and application has additional modules that are needed"
In the meantime I reinstalled java and updated the environment variables. So I gave it a 3rd try. I clicked on "New Titanium Developer available (version 1.2.1)". As a result I get the same error described above (missing installer). Titatium doesn't run anymore. When I try to start titanium I only get this error message.
I already checked the forum for solutions but couldn't find other suggestions but to reinstall. That will not help me. What could be the problem???
This is my installation
- android sdk:
- path: D:\androidSDK\android-sdk_r06-windows\android-sdk-windows
installed packages: - Android SDK Tools, revision 6
- SDK Platform Android 2.2, API 8, revision 1
- Google APIs by Google Inc., Android API 8, revision 1
- SDK Platform Android 1.6, API 4, revision 3
- Usb Driver package, revision 3
- Java JDK
- JDK 6 Update 20
- jdk-6u20-windows-i586.exe
- http://java.sun.com/javase/downloads/widget/jdk6.jsp
- on download page it's called: Java SE Development Kit 6u20
- after installation:
- path: D:\Program Files\Java\jdk1.6.0_20\
- path: D:\Program Files\Java\jre6\
- Titanium
- started Titanium Developer.msi
- D:\Program Files\Titanium Developer\
- SDK version 1.0.0
- environment variables:
- JAVA_HOME: D:\Program Files\Java\jre6\bin\
- Path: D:\Program Files\Java\jre6\bin\
Perhaps anything wrong with the installation?
Regards, Rolf