Problem
Setting the target to Android SDK 11 will result in the application not starting properly. The Android emulator will display an alert with text: "Unfortunately, yourappnamehere has stopped".
Test case
In Titanium SDK.
File -> New -> Titanium project -> Default project -> Next.
Complete the form and select sdk version: 3.0.0.v20121109144656 and click "Finish".
Edit tiapp.xml and replace the android tag with the following:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<tool-api-level>11</tool-api-level>
<manifest>
<uses-sdk android:targetSdkVersion="11"/>
</manifest>
</android>
Run in Android emulator. The Android emulator will display an alert with text: "Unfortunately, yourappnamehere has stopped".
Logs
[ERROR][TiApplication( 1015)] (main) [192,841] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException; Titanium 3.0.0,2012/11/09 14:47,c9cc724
[ERROR][TiApplication( 1015)] java.lang.RuntimeException: Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException
[ERROR][TiApplication( 1015)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
[ERROR][TiApplication( 1015)] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
[ERROR][TiApplication( 1015)] at android.app.ActivityThread.access$600(ActivityThread.java:130)
[ERROR][TiApplication( 1015)] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
[ERROR][TiApplication( 1015)] at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR][TiApplication( 1015)] at android.os.Looper.loop(Looper.java:137)
[ERROR][TiApplication( 1015)] at android.app.ActivityThread.main(ActivityThread.java:4745)
[ERROR][TiApplication( 1015)] at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR][TiApplication( 1015)] at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR][TiApplication( 1015)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
[ERROR][TiApplication( 1015)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
[ERROR][TiApplication( 1015)] at dalvik.system.NativeStart.main(Native Method)
[ERROR][TiApplication( 1015)] Caused by: android.os.NetworkOnMainThreadException
[ERROR][TiApplication( 1015)] at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
[ERROR][TiApplication( 1015)] at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163)
[ERROR][TiApplication( 1015)] at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
[ERROR][TiApplication( 1015)] at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
[ERROR][TiApplication( 1015)] at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
[ERROR][TiApplication( 1015)] at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
[ERROR][TiApplication( 1015)] at org.appcelerator.kroll.common.TiFastDev$Session.blockRead(TiFastDev.java:310)
[ERROR][TiApplication( 1015)] at org.appcelerator.kroll.common.TiFastDev$Session.readInt(TiFastDev.java:349)
[ERROR][TiApplication( 1015)] at org.appcelerator.kroll.common.TiFastDev$Session.readTokenCount(TiFastDev.java:412)
[ERROR][TiApplication( 1015)] at org.appcelerator.kroll.common.TiFastDev.openInputStream(TiFastDev.java:214)
[ERROR][TiApplication( 1015)] at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:53)
[ERROR][TiApplication( 1015)] at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:104)
[ERROR][TiApplication( 1015)] at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:152)
[ERROR][TiApplication( 1015)] at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:109)
[ERROR][TiApplication( 1015)] at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:502)
[ERROR][TiApplication( 1015)] at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:145)
[ERROR][TiApplication( 1015)] at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:97)
[ERROR][TiApplication( 1015)] at android.app.Activity.performCreate(Activity.java:5008)
[ERROR][TiApplication( 1015)] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
[ERROR][TiApplication( 1015)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
[ERROR][TiApplication( 1015)] ... 11 more
[ERROR][AndroidRuntime( 1015)] FATAL EXCEPTION: main
[ERROR][AndroidRuntime( 1015)] java.lang.RuntimeException: Unable to start activity ComponentInfo{com.derp.herp/com.derp.herp.HerpderpActivity}: android.os.NetworkOnMainThreadException
[ERROR][AndroidRuntime( 1015)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
[ERROR][AndroidRuntime( 1015)] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
[ERROR][AndroidRuntime( 1015)] at android.app.ActivityThread.access$600(ActivityThread.java:130)
[ERROR][AndroidRuntime( 1015)] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
[ERROR][AndroidRuntime( 1015)] at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR][AndroidRuntime( 1015)] at android.os.Looper.loop(Looper.java:137)
[ERROR][AndroidRuntime( 1015)] at android.app.ActivityThread.main(ActivityThread.java:4745)
[ERROR][AndroidRuntime( 1015)] at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR][AndroidRuntime( 1015)] at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR][AndroidRuntime( 1015)] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
[ERROR][AndroidRuntime( 1015)] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
[ERROR][AndroidRuntime( 1015)] at dalvik.system.NativeStart.main(Native Method)
[ERROR][AndroidRuntime( 1015)] Caused by: android.os.NetworkOnMainThreadException
[ERROR][AndroidRuntime( 1015)] at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
[ERROR][AndroidRuntime( 1015)] at libcore.io.BlockGuardOs.recvfrom(BlockGuardOs.java:163)
[ERROR][AndroidRuntime( 1015)] at libcore.io.IoBridge.recvfrom(IoBridge.java:513)
[ERROR][AndroidRuntime( 1015)] at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
[ERROR][AndroidRuntime( 1015)] at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:46)
[ERROR][AndroidRuntime( 1015)] at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:240)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.kroll.common.TiFastDev$Session.blockRead(TiFastDev.java:310)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.kroll.common.TiFastDev$Session.readInt(TiFastDev.java:349)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.kroll.common.TiFastDev$Session.readTokenCount(TiFastDev.java:412)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.kroll.common.TiFastDev.openInputStream(TiFastDev.java:214)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.kroll.util.KrollAssetHelper.readAsset(KrollAssetHelper.java:53)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:104)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:152)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:109)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:502)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:145)
[ERROR][AndroidRuntime( 1015)] at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:97)
[ERROR][AndroidRuntime( 1015)] at android.app.Activity.performCreate(Activity.java:5008)
[ERROR][AndroidRuntime( 1015)] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
[ERROR][AndroidRuntime( 1015)] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
[ERROR][AndroidRuntime( 1015)] ... 11 more
Discussions
http://developer.appcelerator.com/question/144780/android-targetsdkversion11-causes-crash-on-30-beta
Also occurs with 2.1.4.GA, I can only get it to work when setting it to 8, get the same behavior setting it to 10+
Same behavior with 3.0.2 GA minSDK=8 and target=11
This problem persists in 3.1.* with any API level greater than 9. If you disable fastdev works ok.
We are deprecating FastDev in version 3.2.0, so marking this as "Won't Fix"
Closing ticket as the issue will not fix and with reference to the above comments.