Java Android Studio中的渲染问题
我安装了Android Studio 1.5.1和Java SE开发工具包v7 Update.80.x64 但当我创建新项目时,ide中会显示此错误:Java Android Studio中的渲染问题,java,android,android-studio,Java,Android,Android Studio,我安装了Android Studio 1.5.1和Java SE开发工具包v7 Update.80.x64 但当我创建新项目时,ide中会显示此错误: Rendering Problems The following classes could not be found: - android.support.design.widget.AppBarLayout (Fix Build Path, Edit XML, Create Class) - android.support.design
Rendering Problems The following classes could not be found:
- android.support.design.widget.AppBarLayout (Fix Build Path, Edit XML, Create Class)
- android.support.design.widget.CoordinatorLayout (Fix Build Path, Edit XML, Create Class)
Tip: Try to build the project. The surrounding layout (@layout/activity_main) did not actually include this layout. Remove tools:showIn=... from the root tag.
我还切换到Java.SE.Development.Kit.v8.Update.74.x64并尝试了所有的stackoverflow q2a
我的android studio默认使用api 23,但我也下载了api 14、15,22,尝试所有这些,重建项目,但没有改变
我是java和android的初学者,从Udemy.The.Complete.android.Developer.Course开始学习。拆下线路
tools:showIn="@layout/activity_main"
问题解决了。新版本的Android必须将这一行作为模板的一部分,但显然与演示中使用的CoordinatorLayout标记冲突(我猜是这样的)完全按照说明操作。拆下线路
tools:showIn="@layout/activity_main"
问题解决了。较新版本的Android必须将这一行作为模板的一部分,但显然与演示中使用的CoordinatorLayout标记冲突(我猜)主要活动还必须知道其中包含内容详细布局。 在布局acitvity_main中添加以下代码
<include layout="@layout/content_detail" />
主要活动还必须知道其中包含内容详细布局。 在布局acitvity_main中添加以下代码
<include layout="@layout/content_detail" />
您是否向gradle构建文件的支持库添加了依赖项?依赖项{compile fileTree(dir:'libs',include:['*.jar'])testCompile'junit:junit:4.12'compile'com.android.support:appcompat-v7:23.1.1'compile'com.android.support:23.1.1'}您是否向gradle构建文件的支持库添加了依赖项?依赖项{compile fileTree(dir:'libs',include:['*.jar'])testCompile'junit:junit:4.12'compile'com.android.support:appcompat-v7:23.1.1'compile'com.android.support:design:23.1.1'}