2017-05-03 6 views
-1
tools:context="com.example.alondra.p1.RegisterActivity"> 

tools:context="com.example.alondra.p1.RegisterActivity"> 

これらは私の2つのエラーツール:2つのxmlファイルでコンテキストエラー

ある。これは、それが

Error:(11, 61) cvc-elt.1.a: Cannot find the declaration of element 'LinearLayout'. 
Error:(1, 56) s4s-elt-schema-ns: The namespace of element 'x' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'. 
Error:(1, 56) s4s-elt-invalid: Element 'x' is not a valid element in a schema document. 
Error:(1, 56) schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. 

より詳細に私に語ったもので、これは他の1

C:\Users\Alondra\AndroidStudioProjects\xxxxxx\app\src\main\res\layout\activity_register.xml 
Error:(9, 61) cvc-elt.1.a: Cannot find the declaration of element 'LinearLayout'. 
Error:(1, 56) s4s-elt-schema-ns: The namespace of element 'x' must be from the schema namespace, 'http://www.w3.org/2001/XMLSchema'. 
Error:(1, 56) s4s-elt-invalid: Element 'x' is not a valid element in a schema document. 
Error:(1, 56) schema_reference.4: Failed to read schema document 'null', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>. 
のためであります
+0

です。それ以外は、「ファイル」 - >「無効化キャッシュ/再起動」を試してください。 – Sac

+0

現在再起動します。結果を更新します – UnruffledST

+0

NDKを使用していますか?そうでなければ、local.propertiesファイルを表示できますか? – Sac

答えて

0

オンデマンドでの設定はインキュベーション機能です。 NDKに「プラットフォーム」ディレクトリがありません。 NDKを使用している場合は、ndk.dirが有効なNDKディレクトリに設定されていることを確認します。現在、C:¥Users¥Alondra¥AppData¥Local¥Android¥Sdk¥ndk-bundleに設定されています。 NDKを使用していない場合は、ANDROID_NDK_HOMEまたはlocal.propertiesからNDK変数の設定を解除し、この警告を削除します。

この

は私が私のGradleコンソールここで

0

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="center_horizontal" 
    android:layout_marginTop="50dp" 
    android:text="Positive + 1" 
    android:textSize="30sp" 
    android:padding="20dp" 
    android:textColor="@color/Black" /> 

<EditText 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:inputType="textEmailAddress" 
    android:maxLines="1" 
    android:id="@+id/etEmail" 
    android:hint="Email" 
    android:textColorHint="@color/Black" 
    android:layout_marginTop="20dp" 
    android:layout_marginBottom="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginLeft="10dp"/> 

<EditText 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/etPass" 
    android:inputType="textPassword" 
    android:hint="Password" 
    android:textColorHint="@color/Black" 
    android:maxLines="1" 
    android:layout_marginBottom="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginLeft="10dp"/> 

<Button 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/btnLogin" 
    android:text="Login" 
    android:layout_marginBottom="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginLeft="10dp" 
    android:onClick="Login" /> 

<Button 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/btnReg" 
    android:text="Register" 
    android:layout_marginBottom="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginLeft="10dp" 
    android:onClick="register" 
    /> 

から取得エラーです他の1

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="Welcome Back" 
    android:layout_gravity="center_horizontal" 
    android:layout_marginLeft="10dp" 
    android:layout_marginTop="10dp" 
    android:textAppearance="?android:attr/textAppearanceLarge" 
    android:id="@+id/tvEmail"/> 

<RelativeLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="horizontal"> 

<Button 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/btnLogout" 
    android:text="Log Out" 
    android:layout_alignParentBottom="true" /> 

</RelativeLayout> 
</LinearLayout> 

、ここであなたのXMLファイルを追加し、最後の1

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:layout_gravity="center_horizontal" 
    android:layout_marginTop="50dp" 
    android:text="Positive + 1" 
    android:textSize="30sp" 
    android:padding="20dp" 
    android:textColor="@color/Black" /> 

<EditText 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:inputType="textEmailAddress" 
    android:maxLines="1" 
    android:id="@+id/etEmail" 
    android:hint="Email" 
    android:textColorHint="@color/Black" 
    android:layout_marginTop="20dp" 
    android:layout_marginBottom="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginLeft="10dp"/> 

<EditText 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/etPass" 
    android:inputType="textPassword" 
    android:hint="Password" 
    android:textColorHint="@color/Black" 
    android:maxLines="1" 
    android:layout_marginBottom="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginLeft="10dp"/> 


<Button 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:id="@+id/btnReg" 
    android:text="Register" 
    android:layout_marginBottom="10dp" 
    android:layout_marginRight="10dp" 
    android:layout_marginLeft="10dp" 
    android:onClick="register" 
    /> 

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textAppearance="?android:attr/textAppearanceMedium" 
    android:text="Back to Login" 
    android:id="@+id/tvLogin" 
    android:textColor="@color/Black" 
    android:layout_gravity="center_horizontal" 
    /> 

関連する問題