0

我有一个 Android 项目,由多个模块组成。我不使用 Gradle

使用 Android 2.2.3,该项目运行良好,但我将 Android Studio 更新为 2.3。

当我加载项目时,我收到了这条消息:

Update Property Files
The structure of following Android modules was changed:
ActionbarSherlock

我检查了我的存储库以查看主项目中发生了什么变化,在我的项目配置中,我发现了以下内容。

这些行已被删除:

# This file is automatically generated by IntelliJ IDEA
# Project target.
target=android-16
android.library.reference.1=../ActionbarSherlock
android.library.reference.2=../WizarDroid

并添加了这一行:

# This file is automatically generated by IntelliJ IDEA
# Project target.
target=android-16
project.type=0

在模块依赖项中,我仍然可以看到模块,但出现编译错误:

D:\MainProject\res\values\styles.xml:51: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light'.

D:\MainProject\res\values\styles.xml:53: error: Error: No resource found that matches the given name: attr 'actionBarTabStyle'.

我能做些什么呢?

更新:

我无法让它与 2.3 一起工作,所以我恢复到 2.2.3。现在,当我的项目编译并运行时,它崩溃并出现以下错误:

 java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.Button

在消息对话框中,它显示完全不同的文本而不是 OK 文本。它真的搞砸了我的项目......

4

1 回答 1

0

我不得不恢复到 2.2.3 并再次添加模块。

我想,在 2.3 中只有 Gradle 是安全的......

于 2017-03-07T08:12:00.023 回答