我正在尝试构建由另一个开发人员创建的应用程序。我已经导入了该项目,并将依赖项更新为最新版本。当我尝试运行时,我得到以下错误:
[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:ProjectsNew_workspaceappbuildandroidresvaluestheme.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>
以下是我使用的版本:
<manifest android:versionCode="8" android:versionName="1.1.7">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
Titanium SDK版本:7.5.0.GA
Axway Appcelerator Studio,版本:5.1.1..201809051655
有人能告诉我这个错误的可能原因是什么吗?
请查看以下文档:https://wiki.appcelerator.org/display/guides2/Android+主题#AndroidThemes AndroidThemes
不允许将主题命名为theme.xml
。这将覆盖内部主题。因此,如果您重命名文件,它应该可以工作。
另外,请尝试不带@style
的<style name="Theme.skitanium" parent="Theme.AppCompat.Light">
。上有一个示例https://docs.axway.com/bundle/Titanium_SDK_allOS_en/page/android_themes.html在没有太多的情况下使用它