0

首先對不起我的英文! 我認爲:http://www.appcelerator.com/blog/2015/07/understanding-the-android-material-theme/下面的步驟使用我的Android應用程序的材料主題!它適用於Titanium Classic,但不適用於Alloy Framework。這兩種方法有差異嗎?鈦合金材質設計

隨着合金我只是沒有看到有或沒有主題的任何differencies。

我收到的錯誤是:

[ERROR] Detected legacy "/platform" directory in project directory. 
[ERROR] Please move the "/platform" directory to "/app/platform" for Alloy 1.8.0 or later. [ERROR] Alloy compiler failed 

但移動/平臺/應用/平臺,它仍然沒有工作

謝謝,盧卡

編輯:

我發現一個可能的修復。在我tiapp.xml(與TiShadow產生的),我有:

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

    <manifest android:versionCode="6" android:versionName="1.5.0"> 

    <uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" /> 
     //long list of uses-permission 
    <uses-feature android:name='android.hardware.microphone' android:required="false" /> 
     //long list of uses-features 
    <application> 
     <meta-data android:name="com.sec.android.support.multiwindow" android:value="true"/> 
    </application> 
    </manifest> 
    **POSITION TWO** 
</android> 

我要插入:

<manifest> 
     <application android:theme="@style/Theme.Appcelerator"> </application> 
</manifest> 

如果我插入它位置的一個,這是行不通的(完全忽略);但如果我將它插入POSITION TWO它工作正常。

我試了更多次,結果相同。有人能給我一個解釋嗎? :困惑:

+0

它顯示任何錯誤?請在這裏發佈你的代碼。 – Sachith

+0

沒有人錯誤,只是顏色不會改變。 我按照步驟在一個空白的鈦+ TiShadow +合金項目指南中的示例 – Luca4k4

+0

對不起,我收到此錯誤: [錯誤]檢測到項目目錄中的傳統「/平臺」目錄。 [錯誤]請將合金1.8.0或更高版本的「/ platform」目錄移動到「/ app/platform」。 [錯誤]合金編譯器失敗。 ... 但移動/平臺到/應用程序/平臺它仍然無法工作 – Luca4k4

回答

0

首先,請編輯您的問題,通過添加您的答案,因爲它不是一個答案。

現在來查詢,後面兩個位置的原因是:

應用標籤必須進來清單標籤,否則會被忽略。

由於清單標籤是最頂層的標籤,這就是爲什麼波什1被忽略,下面休息清單標籤是內清單考慮,所以這就是爲什麼波什2的作品。現在

,你已經有了下面的應用標籤使用特徵,所有你需要的是在機器人添加:主題=「@風格/ Theme.Appcelerator」屬性應用標籤。

因此,最終的的Android標籤在tiapp.xml將這個樣子:

<android xmlns:android="http://schemas.android.com/apk/res/android"> 
    <manifest android:versionCode="6" android:versionName="1.5.0"> 

    <uses-permission android:name="android.permission.ACCESS_CHECKIN_PROPERTIES" /> 

    <uses-feature android:name='android.hardware.microphone' android:required="false" /> 

    <application android:theme="@style/Theme.Appcelerator"> 
     <meta-data android:name="com.sec.android.support.multiwindow" android:value="true"/> 
    </application> 

    </manifest> 
</android> 
+0

它的工作原理!非常感謝你! – Luca4k4

0

僅供參考標記爲正確的答案不再工作爲Appcelerator的將刪除解決方案/ RES /價值/目錄在生成和錯誤,它無法找到您新創建的主題。截至目前,把你的theme.xml放在app/platform/android /中。