Fast Deploy causing problems

I just updated to AndroidWorks R1, with NSight Tegra 2.2. I have a vcxproj that I created under NSight Tegra 2.1.

In this setup, the Fast Deploy option is set to blank and there is no drop-down. This seems to default to Fast Deploy being on. In my case, this crashes the app on startup with a missing activity exception.

Once I figured this out, it was easy enough to manually delete the app off of my device and do a full rebuild in Visual Studio. The resulting build worked.

Can NVidia explain how Fast Deploy is supposed to work? I tried building with it on and with it off, and the classes.dex file is a few bytes smaller without it and, by scouring a hexdump, appears to be missing my activity class.

Any insight on how Fast Deploy is supposed to work or pointers on how I can use this experimental feature would be appreciated.

hi MiabbeFrogtoss,
This include two parts, Fast Build and Fast deploy.
Fast Build would skip APK Building if the java/Android parts are unchanged. And Fast Deploy would only update your native .so on your device when debugging.

Victor

Hi Victor,

Yes, I can confirm I am definitely talking about Fast Deploy, here. Fast Build is not in question.

When I fully rebuild with fast deploy off, I have no problems. When I turn it on and do a rebuild, I get the following error soon after logging starts:

966 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.somecompany.game/com.nvidia.pentak.LaunchProxy}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.somecompany.game/GameMain}; have you declared this activity in your AndroidManifest.xml?
966   966 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2299)
966   966 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2361)
966   966 E AndroidRuntime: 	at android.app.ActivityThread.access$800(ActivityThread.java:145)
966   966 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1279)
966   966 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
966   966 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:135)
966   966 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5240)
966   966 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
966   966 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Method.java:372)
966   966 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
966   966 E AndroidRuntime: 	at com.android.internal.os.WrapperInit.main(WrapperInit.java:83)
966   966 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
966   966 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:249)
966   966 E AndroidRuntime: Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.somecompany.game/GameMain}; have you declared this activity in your AndroidManifest.xml?
966   966 E AndroidRuntime: 	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1761)
966   966 E AndroidRuntime: 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1485)
966   966 E AndroidRuntime: 	at android.app.Activity.startActivityForResult(Activity.java:3736)
966   966 E AndroidRuntime: 	at android.app.Activity.startActivityForResult(Activity.java:3697)
966   966 E AndroidRuntime: 	at android.app.Activity.startActivity(Activity.java:4007)
966   966 E AndroidRuntime: 	at android.app.Activity.startActivity(Activity.java:3975)
966   966 E AndroidRuntime: 	at com.nvidia.pentak.LaunchProxy.onCreate(LaunchProxy.java:24)
966   966 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:5933)
966   966 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
966   966 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2252)
966   966 E AndroidRuntime: 	... 12 more

GameMain is an activity that definitely exists.

Fast Deploy is an experimental mechanism and it works by generating and inserting a new activity into your APK and changing the bits of AndroidManifest.xml. Judging by your log it looks like the generated activity fails to pass the execution to the original one. I’m afraid there’s nothing you can do to fix it on your side at this moment.

We’re also working on a more stable version of Fast Deploy at the moment. You can consider the currently released one a preview.