0

I started a new test app, and downloaded a Holo Theme (by name JSTheme) from Android-holo-colors.com And replaced the /res folder contents with the res folder in that downloaded zip file.

But when I replace the line in tiapp.xml

<android xmlns:android="http://schemas.android.com/apk/res/android" />

to this, then the compile is not happening. It shows then: [ERROR] : Failed to package application: [ERROR] Application Installer abnormal process termination. Process exit value was 1

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <tool-api-level>14</tool-api-level>
    <manifest>
        <application android:theme="@style/Theme.JSTheme"/>
        <uses-sdk android:targetSdkVersion="14"/>
    </manifest>
</android>

And when I restore back the lines above to same

Then the app gets compiled and everything works.

Am I doing something wrong?

And when I restore back the lines above to same

<android xmlns:android="http://schemas.android.com/apk/res/android" />

Then the app gets compiled and everything works.

Am I doing something wrong?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Molly
  • 35
  • 6

2 Answers2

0
  1. Make sure that the JSTheme.xml file is in the correct directory and format --> The correct directory for android themes is

platform/android/res/values/JSTheme.xml

And the correct format should be like

<!-- Works for Titanium SDK 3.3.0 and later -->
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android">
    <style name="LightDarkBar" parent="Theme.AppCompat.Light.DarkActionBar"/>
    <style name="Light" parent="Theme.AppCompat.Light"/>
    <style name="Dark" parent="Theme.AppCompat"/>
</resources>

For more details about custom themes, check this link.

  1. If this doesn't work, try this code in the tiapp.xml:

    <android xmlns:android="http://schemas.android.com/apk/res/android">
        <manifest>
            <application android:theme="@style/Theme.JSTheme"/>
        </manifest>
    </android>
    
Zabady
  • 301
  • 1
  • 3
  • 14
0

Titanium doesn't support Holo themes anymore, make sure that you select 'appcompat' on the compatibility section of Android-holo-colors.com

Also, i found it best to use only lower case letters on the website and then capitalise the first letter in tiapp.xml

e.g. on Android-holo-colors.com name it: jstheme

then in tiapp.xml: <application android:theme="@style/Theme.Jstheme"/>

Martyn Joyce
  • 374
  • 1
  • 10
  • But it says that - Min SDK supported by your app (if >= 11, will only generate holo resources). So if I am targeting >11 then the deafult generation would be of type Holo? Is there any other site which can provide good UI Sample App/Screens for Titanium Alloy? – Molly Apr 23 '15 at 17:29