[TIMOB-508] cannot access org.appcelerator.titanium.TiRootActivity upon trying to deploy KitchenSink demo app on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2012-07-25T13:18:20.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, class-not-found, deployment, droid, emulator, kitchensink |
Reporter | Chris Wolf |
Assignee | Neeraj Gupta |
Created | 2011-04-15T02:30:32.000+0000 |
Updated | 2012-07-26T20:55:04.000+0000 |
Description
I cannot deploy the KitchenSink demo app on any form of
Android emulator. I downloaded the
app via the download button (not git) which offered a zip or tar
archive. The base directory
of the archive is:
ls -l appcelerator-KitchenSink-4d0db58/
total 32
drwxr-xr-x 3 cwolf cwolf 102 Mar 2 00:49 0.8.1
drwxr-xr-x 2 cwolf cwolf 68 Mar 2 00:48 0.9.x
-rwxr-xr-x 1 cwolf cwolf 11485 Feb 26 09:39 LICENSE
-rwxr-xr-x 1 cwolf cwolf 709 Feb 26 09:39 README.md
I imported the project into the Titanium IDE and set the log
filter to "debug" and pressed
"launch" it seems to always have a class-not-found upon compilation
phase. The relavant log output is:
[DEBUG] javac -classpath /opt/android-sdk/platforms/android-1.6/android.jar:/Library/Application Support/Titanium/mobilesdk/osx/0.9.3/android/titanium.jar -d /Users/cwolf/Desktop/Downloads/appcelerator-KitchenSink-4d0db58/0.8.1/KitchenSink/build/android/bin/classes -sourcepath /Users/cwolf/Desktop/Downloads/appcelerator-KitchenSink-4d0db58/0.8.1/KitchenSink/build/android/src /Users/cwolf/Desktop/Downloads/appcelerator-KitchenSink-4d0db58/0.8.1/KitchenSink/build/android/src/com/appcelerator/kitchensink/KitchensinkActivity.java /Users/cwolf/Desktop/Downloads/appcelerator-KitchenSink-4d0db58/0.8.1/KitchenSink/build/android/src/com/appcelerator/kitchensink/KitchensinkAppInfo.java /Users/cwolf/Desktop/Downloads/appcelerator-KitchenSink-4d0db58/0.8.1/KitchenSink/build/android/src/com/appcelerator/kitchensink/KitchensinkApplication.java /Users/cwolf/Desktop/Downloads/appcelerator-KitchenSink-4d0db58/0.8.1/KitchenSink/build/android/src/com/appcelerator/kitchensink/R.java
[ERROR] javac /Users/cwolf/Desktop/Downloads/appcelerator-KitchenSink-4d0db58/0.8.1/KitchenSink/build/android/src/com/appcelerator/kitchensink/KitchensinkActivity.java:3: cannot access org.appcelerator.titanium.TiRootActivity
I tried both the "0.9.x" and "0.8.1" version of the
KitchenSink app and got the same error.
Next, I looked at the javac command line (above) to see
what jars were being referenced and
looked in the titanium.jar and see the class that's
reported not found is, in fact, in the jar:
$ cd /Library/Application Support/Titanium/mobilesdk/osx/0.9.3/android
$ jar tvf titanium.jar | grep TiRoot
414 Mon Mar 01 20:14:56 EST 2010 org/appcelerator/titanium/TiRootActivity$TiActivityRef.class
918 Mon Mar 01 20:14:56 EST 2010 org/appcelerator/titanium/TiRootActivity$1.class
6043 Mon Mar 01 20:14:56 EST 2010 org/appcelerator/titanium/TiRootActivity.class
I have MacOS 10.5.8. Java version 1.5.0_22 (apple). I
tried using all Android SDK emulations,
1.5, 1.6 and 2.0 (it would be helpful if a "readme" in
KitchenSink indicated which to use)
Attachments
File | Date | Size |
---|---|---|
kitchensink_eclipse.png | 2011-04-15T02:30:34.000+0000 | 148453 |
mobiles.py | 2011-04-15T02:30:33.000+0000 | 910 |
Changing assignment from "none" to "Kevin Whinnery", since that's the submitter I see in the git log.
I ran the Android SDK and AVD manager and updated to the latest versions and still get the problem.
I tried loading the Eclipse project in the build subdirectory, just to see what would happen and got the result show in the attached screen shot.
I cut&paste the javac command from the log (above) and used it to create a shell script to run the compiler from the command line and was able to see additional error info not displayed in the Titanium log:
The class version mismatch indicated that I should be using JDK-1.6, not 1.5, which is the default setting on MacOS 10.5.8. I then used the Apple Java Preferences.app to change the JDK search order to try 1.6 first. This resolves the issue of building and running KitchenSink in the emulator.
Unfortunately, I am now unable to deploy KitchenSink on a real device, in my case, a Motorola Droid running Android-2.0.
I changed the phone setting to allow non-Marketplace apps, and this still does not help. There's no log or indication that the deployment failed. Although I see this in the
/var/log/system.log
:...if that means anything.
I tried to run that builder.py from the command line:
...but got the following except stack trace:
...but when I tried to run those lines in pyparser.py from the interpreter, everything looked fine:
Any ideas how I can debug this device deployment problem?
I'm going to try reassigning to Nolan Wright, since it appears he was the original developer of KitchenSink.
I guess I should have watched the videos first. (I did read the "getting started guide") One of the videos
points out that in addition to setting "allow installation of non-market apps", you also need
"usb debug" turned on. This allowed me to install the app. Before I saw this, I tried modifying mobiles.py to add my Motorola Droid's vendor and product code to the device lookup table.
It turns out not to matter, but I'll attach it anyway since usbprobe returns with zero exit
status (device was found).
Feel free to close this ticket. Thanks and sorry for the noise...
I should add that one of the videos incorrectly states that java-5 (1.5) can be used, but I found that
java 1.6 is the minimum (at least for Android).
Cannot reproduce.