Android targetSdkVersion build problem

You must Login before you can answer or comment on any questions.

Hi all,

I have a problem on Android simulator when I try to launch the app after changing the tiapp.xml like this :

<android xmlns:android="http://schemas.android.com/apk/res/android">
        <tool-api-level>8</tool-api-level>
        <manifest android:versionCode="1" android:versionName="1">   
            <supports-screens android:smallScreens="true" android:normalScreens="true" 
                              android:largeScreens="true" android:anyDensity="false" />
            <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" 
                      android:installLocation="preferExternal"/>
        </manifest>
    </android>
the application seems frozen and I get this message when I try to build :
[ERROR][TiApplication( 1002)] (main) [11,1167] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to create application com.infotelsrl.todo.TodoApplication: java.lang.NullPointerException; Titanium 2.1.2,2012/08/24 14:46,ed7f777
[ERROR][TiApplication( 1002)] java.lang.RuntimeException: Unable to create application com.infotelsrl.todo.TodoApplication: java.lang.NullPointerException
[ERROR][TiApplication( 1002)]   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4154)
[ERROR][TiApplication( 1002)]   at android.app.ActivityThread.access$1300(ActivityThread.java:130)
[ERROR][TiApplication( 1002)]   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1255)
[ERROR][TiApplication( 1002)]   at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR][TiApplication( 1002)]   at android.os.Looper.loop(Looper.java:137)
[ERROR][TiApplication( 1002)]   at android.app.ActivityThread.main(ActivityThread.java:4745)
[ERROR][TiApplication( 1002)]   at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR][TiApplication( 1002)]   at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR][TiApplication( 1002)]   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
[ERROR][TiApplication( 1002)]   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
[ERROR][TiApplication( 1002)]   at dalvik.system.NativeStart.main(Native Method)
[ERROR][TiApplication( 1002)] Caused by: java.lang.NullPointerException
[ERROR][TiApplication( 1002)]   at org.appcelerator.kroll.common.TiFastDev.showToast(TiFastDev.java:157)
[ERROR][TiApplication( 1002)]   at org.appcelerator.kroll.common.TiFastDev.showDisabledWarning(TiFastDev.java:164)
[ERROR][TiApplication( 1002)]   at org.appcelerator.kroll.common.TiFastDev.connect(TiFastDev.java:147)
[ERROR][TiApplication( 1002)]   at org.appcelerator.kroll.common.TiFastDev.readDeployData(TiFastDev.java:119)
[ERROR][TiApplication( 1002)]   at org.appcelerator.kroll.common.TiFastDev.<init>(TiFastDev.java:99)
[ERROR][TiApplication( 1002)]   at org.appcelerator.kroll.common.TiFastDev.initFastDev(TiFastDev.java:73)
[ERROR][TiApplication( 1002)]   at org.appcelerator.titanium.TiApplication.postAppInfo(TiApplication.java:374)
[ERROR][TiApplication( 1002)]   at com.infotelsrl.todo.TodoApplication.onCreate(TodoApplication.java:34)
[ERROR][TiApplication( 1002)]   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:999)
[ERROR][TiApplication( 1002)]   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4151)
[ERROR][TiApplication( 1002)]   ... 10 more
Thanks

— asked 8 months ago by Mauro Vitale
4 Comments
  • Missing from your question are a number of important pieces of information. I suggest you take a look at the Using Questions and Answers article, specifically the Q&A Question Checklist. The missing information is critical to reproducing problems in a test environment and often indicates other factors that cause the undesirable outcome you are experiencing.

    — commented 8 months ago by Stephen Feather

  • thanks for the advice:

    1. Application type: mobile
    2. Titanium SDK: Titanium SDK version: 2.1.2 (24/08/12 14:46 ed7f777)
    3. Platform & version: Android 4.1
    4. Device: Android emulator
    5. Host Operating System: Ubuntu 12.04
    6. Titanium Studio: Titanium Studio, build: 2.1.2.201208301612

    I get the same error message with any API level typed in "android: targetSdkVersion." I hope it is sufficient to understand the scenario.

    — commented 8 months ago by Mauro Vitale

  • There seems some issue with your configuration, i tried with same and it works fine

    — commented 8 months ago by Perminder Singh Bhatia

  • Show 1 more comment

1 Answer

this problem has been resolved, to show the application in holo theme in my "tiapp.xml" i have :

<android xmlns:android="http://schemas.android.com/apk/res/android">
   <!-- used to compile -->
  <tool-api-level>14</tool-api-level>
  <manifest>
    <supports-screens android:anyDensity="false"/>
    <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="14"/>
    <application android:theme="@android:style/Theme.Holo.Light"/>         
  </manifest>
</android>
in my case i have also set the "holo light" theme.

Your Answer

Think you can help? Login to answer this question!