Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

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

— asked July 4th 2010 by Rolf Dohrmann
  • android
  • emulation
  • mobile
  • vista
  • win32
0 Comments

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.
    — answered July 4th 2010 by David Ashwood
    permalink
    1 Comment
    • When working with the Android emulator you'll sometimes, not often but sometimes, find it behaving oddly and you'll want to reset it so that it's clean.

      You can do this pretty easily:

      • Stop the emulator
      • running, from the cmd prompt, 'android' to bring up the emulator manager
      • Select the emulator you'd like to clean
      • hit start
      • select "wipe user data"
      • select "start/ok"

      Starting the emulator via the 'android' command may cause the Ti Dev IDE to complain but it'll continue and should install the app.

      — commented July 4th 2010 by David Ashwood
  • 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

    1. 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
    1. 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\
    1. Titanium
    • started Titanium Developer.msi
    • D:\Program Files\Titanium Developer\
    • SDK version 1.0.0
    1. 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

    — answered July 4th 2010 by Rolf Dohrmann
    permalink
    6 Comments
    • It's been a while since I used windows - so I won't be of much help I'm afraid. Have you looked at this post on the issue?

      — commented July 4th 2010 by David Ashwood
    • Thanks David,

      yes, I already found this posting. The updating problem at least is fixed. I again deleted all directories manually. Not only subfolders of titanium directories, but all titanium directories completely. Then I downloaded titanium again, started the installer and installed titanium. I was asked if I want to install the latest mobile SDK 1.3.0. I agreed. After downloading and installing I closed and opened Titanium again. Now I have titanium version 1.2.1. Not really sure why that's the case, but OK.

      I now will continue testing launching apps in the android emulation.

      Regards, Rolf

      — commented July 4th 2010 by Rolf Dohrmann
    • ok - cool.
      There are 2 parts to Titanium - the Dev IDE for managing your projects, launching the emulator, etc and the SDK.

      The SDK is what you code against when you develop apps.

      The current Dev IDE version is 1.2.1 and the current SDK version is 1.3.0.

      — commented July 4th 2010 by David Ashwood
    • Don't forget to close the question if you're happy with the answer - it makes it easier to see what's outstanding when looking for issues people have :)

      — commented July 4th 2010 by David Ashwood
    • thanks david,
      everything's fine at the moment. How do I close the question?

      — commented July 4th 2010 by Rolf Dohrmann
    • Click the "Mark as best Answer" button :)

      — commented July 5th 2010 by David Ashwood
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.