构建Appcelerator项目时出错:无法打包应用程序:错误:检索项目的父项时出错

时间:2019-02-07 06:46:52

标签: titanium appcelerator appcelerator-titanium appcelerator-mobile appcelerator-studio

我正在尝试构建另一个开发人员创建的应用程序。我已经导入了项目并将依赖项更新为最新版本。当我尝试运行时,出现以下错误:

var unqKey = "some unique ID" //EDIT

enum SubProjectKeys  : String,CaseIterable{

    case key1
    case key2
    case key3
    case key4

    var uniqueKey : String { //EDIT

            return  unqKey + self.rawValue
        }



}


func removeKeysForSubProject() {

    let userDefaultsObj = UserDefaults()
    for key in SubProjectKeys.allCases {

        userDefaultsObj.removeObject(forKey:  key.uniqueKey) //EDIT
        userDefaultsObj.synchronize()
    }
}

[ERROR] : Failed to package application: [ERROR] : [ERROR] : (skipping file '.gitkeep' due to ANDROID_AAPT_IGNORE pattern '.*') [ERROR] : (skipping file '.liveviewapp.js' due to ANDROID_AAPT_IGNORE pattern '.*') [ERROR] : E:\Projects\New_workspace\app\build\android\res\values\theme.xml:28: error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.skitanium'. [ERROR] Application Installer abnormal process termination. Process exit value was 1 文件具有以下内容:

themes.xml

以下是我使用的版本:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Theme.skitanium" parent="@style/Theme.AppCompat.Light">
        <item name="editTextStyle">@style/editText</item>
        <item name="android:windowBackground">@drawable/background</item>
        <item name="android:windowActionBar">false</item>
        <item name="android:windowNoTitle">true</item>
        <!-- AppCompat Compatibility -->
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>
    <!-- Text fields -->
    <style name="editText" parent="@android:style/Widget.EditText">
        <item name="android:textCursorDrawable">@null</item>   
        <item name="android:textColor">#000000</item>
        <item name="android:paddingTop">0dp</item>
        <item name="android:paddingBottom">0dp</item>
        <item name="android:gravity">center_vertical</item>
        <item name="android:layout_width">wrap_content</item>
    </style>
</resources>

Titanium SDK版本:7.5.5.0.GA

Axway Appcelerator Studio,内部版本:5.1.1.201809051655

有人可以指导我此错误的可能原因是什么吗?

1 个答案:

答案 0 :(得分:0)

请通过以下网址查看文档:{​​{3}}

不允许将主题命名为theme.xml。这将覆盖内部主题。因此,如果您重命名文件,它将可以正常工作。

另外,请尝试使用<style name="Theme.skitanium" parent="Theme.AppCompat.Light">,而不使用@stylehttps://wiki.appcelerator.org/display/guides2/Android+Themes#AndroidThemes-Androidthemes上有一个示例,在没有使用它的情况下

相关问题