android - uri 未注册 http ://schemas. android.com/apk/res/android

标签 android android-layout android-studio

我收到 uri 未在我的代码中注册。

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
    <ProgressBar
        android:layout_height="wrap_content"
        android:layout_width="wrap_content"
        android:layout_gravity="center"
        android:id="@+id/progressBar1"/>

    <WebView
        android:id="@+id/webview01"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"
        android:layout_weight="1">
    </WebView> 
</LinearLayout>

我在 ma​​in/res/layout. 下创建了一个目录 tabdir 并想在 tabdir 中创建 xml 文件。

最佳答案

如果创建子目录,android studio 不会将其识别为标准资源目录。您可以通过在 Android Studio 中将项目资源管理器模式从“项目”更改为“Android”来查看效果。

enter image description here

enter image description here

嗯,如果需要创建子目录,按照this所以线程。 或者快速解决错误的方法是将布局文件移动到 main/res/layout 目录。

关于android - uri 未注册 http ://schemas. android.com/apk/res/android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41778101/

相关文章:

java - 如何在屏幕底部显示对话框

安卓 英特尔 VT-x ubuntu

android - 如何以编程方式停止将 logcat 保存到 Android 设备上的文件?

android - 无法在 Android Studio 2.0 中打开项目结构

android-studio - Kotlin中 Unresolved reference 错误(bottom_navigation.setOnNavigationItemSelectedListener)

android - 如何将多个整数发送到新 Activity ?

android - 更改微调器的背景颜色隐藏下拉箭头

android - 如何在请求广告时使 AdView "occupy"空间? (安卓)

android - 在 Android 应用程序中绘制思维导图的最佳方式是什么?

Android Gradle 错误 : "Failed to get application id for debug"