[TIMOB-2528] Android: Apps created with 'Distribute' under 1.5. do not work
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:59:21.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M05 |
Components | Android |
Labels | android, defect |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-04-15T03:21:59.000+0000 |
Updated | 2011-04-17T01:59:21.000+0000 |
Description
It appears to be related to compiled javascript. Note: I do not have the compiling option turned on in tiapp.xml.
E/ROOT (10952): (main) [14,120] Leaving TiRootActivity.onCreate
I/Log (10952): (main) [0,0] checkpoint, on root activity resume. context = org.appcelerator.titanium.TiContext@46384210
I/TiRootActivity(10952): (Thread-9) [2,2] eval app.js
D/KrollContext(10952): (kroll$1) [3,5] Running pre-compiled script: app.js
E/KrollContext(10952): (kroll$1) [0,5] Couldn't find pre-compiled class for script: app.js
E/KrollContext(10952): java.lang.ClassNotFoundException: com.billdawson.basictabs.js.app
E/KrollContext(10952): at java.lang.Class.classForName(Native Method)
E/KrollContext(10952): at java.lang.Class.forName(Class.java:235)
E/KrollContext(10952): at java.lang.Class.forName(Class.java:182)
E/KrollContext(10952): at org.appcelerator.titanium.TiScriptRunner.runScript(TiScriptRunner.java:83)
E/KrollContext(10952): at org.appcelerator.titanium.kroll.KrollContext.runCompiledScript(KrollContext.java:177)
E/KrollContext(10952): at org.appcelerator.titanium.kroll.KrollContext.handleEvalFile(KrollContext.java:218)
E/KrollContext(10952): at org.appcelerator.titanium.kroll.KrollContext.handleMessage(KrollContext.java:115)
E/KrollContext(10952): at android.os.Handler.dispatchMessage(Handler.java:95)
E/KrollContext(10952): at android.os.Looper.loop(Looper.java:144)
E/KrollContext(10952): at org.appcelerator.titanium.kroll.KrollHandlerThread.run(KrollHandlerThread.java:73)
E/KrollContext(10952): Caused by: java.lang.NoClassDefFoundError: com.billdawson.basictabs.js.app
E/KrollContext(10952): ... 10 more
E/KrollContext(10952): Caused by: java.lang.ClassNotFoundException: com.billdawson.basictabs.js.app in loader dalvik.system.PathClassLoader[/data/app/com.billdawson.basictabs-1.apk]
E/KrollContext(10952): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
E/KrollContext(10952): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/KrollContext(10952): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/KrollContext(10952): ... 10 more
(from [6f3fd7fc2b8c78ff44145465ec26f80303129cf5]) set the ti.deploytype property internally when setDeployType is called in tiapp.py [#2528 state:fixed-in-qa]
https://github.com/appcelerator/titanium_mobile/commit/6f3fd7fc2b8c78ff44145465ec26f80303129cf5"> https://github.com/appcelerator/titanium_mobile/commit/6f3fd7fc2b8c...
Hope this is not user error, I walked through the guide for packaging and it resulted in a crash on launch with the following error:
W/dalvikvm( 3970): threadid=1: thread exiting with uncaught exception (group=0x4001d7e0)
E/AndroidRuntime( 3970): FATAL EXCEPTION: main
E/AndroidRuntime( 3970): java.lang.RuntimeException: Unable to instantiate application com.appcelerator.package.PackageApplication: java.lang.ClassNotFoundException: com.appcelerator.package.PackageApplication in loader dalvik.system.PathClassLoader[/data/app/com.appcelerator.package-1.apk]
E/AndroidRuntime( 3970): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:649)
E/AndroidRuntime( 3970): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4232)
E/AndroidRuntime( 3970): at android.app.ActivityThread.access$3000(ActivityThread.java:125)
E/AndroidRuntime( 3970): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)
E/AndroidRuntime( 3970): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 3970): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 3970): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime( 3970): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 3970): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 3970): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime( 3970): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime( 3970): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 3970): Caused by: java.lang.ClassNotFoundException: com.appcelerator.package.PackageApplication in loader dalvik.system.PathClassLoader[/data/app/com.appcelerator.package-1.apk]
E/AndroidRuntime( 3970): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
E/AndroidRuntime( 3970): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
E/AndroidRuntime( 3970): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
E/AndroidRuntime( 3970): at android.app.Instrumentation.newApplication(Instrumentation.java:942)
E/AndroidRuntime( 3970): at android.app.ActivityThread$PackageInfo.makeApplication(ActivityThread.java:644)
E/AndroidRuntime( 3970): ... 11 more
W/ActivityManager( 1297): Force finishing activity com.appcelerator.package/.PackageActivity
attaching key.store and APK file. pasword is "tester"
weird, attachments are failing silently, will email files to Marshal
Hey Thomas. The original failure was about the JS class not being found, but your error looks like the generated Application class can't be found, which is odd. Were there any errors during the app build process that you saw? Can you check to see if build/android/bin/com/appcelerator/package/PackageApplication.class exists?
note to self - don't use the name "package".
I'm getting the "Couldn't find pre-compiled class for script" in 1.5.1 and 1.5.2. How to resolve it?