Android Studio 2.3删除了模块引用

时间:2017-03-06 10:31:55

标签: android android-studio android-studio-2.3

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

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

当我加载 main 项目时,我收到了以下消息:

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文本。这真的搞砸了我的项目...

1 个答案:

答案 0 :(得分:0)

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

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