简体   繁体   English

如何从git app克隆而不会发生错误

[英]How can i clone from git app without occurred no error

I want to clone this app from git 我想从git克隆这个应用程序

https://github.com/mdy0501/Airbnb https://github.com/mdy0501/Airbnb

But there is a problem when I clone it from git 但是当我从git克隆它时会出现问题

When I clone its layout show 'Unresolved class' 当我克隆它的布局时显示'Unresolved class'

!-- This is one of layout that shows error -- ! - 这是显示错误的布局之一 -

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/DeepGreen"
    tools:context="com.android.airbnb.WelcomeActivity">

Under this code shows red 在此代码下显示红色

@color/DeepGreen
.airbnb.WelcomeActivity

Even though that .xml and class file has existed That showing error (i attach photo also) enter image description here 即使那个.xml和类文件已经存在,显示错误(我也附上照片) 在这里输入图像描述

I want to know how I can fix that when I clone from git that I would be very thankful if I see that activity from my android studio 我想知道如何解决这个问题,当我从git克隆时,如果我从我的android工作室看到那个活动,我会非常感激

All those red lines came from android studio not being able to find them. 所有这些红线来自android工作室无法找到它们。 Make sure they are all available and the path is as expected like the WelcomeActivity. 确保它们全部可用,路径与WelcomeActivity一样符合预期。 Make sure the package name is as expected and the build.gradle has the constraint layout dependency. 确保包名称符合预期,并且build.gradle具有约束布局依赖性。 If you have done those, all you do is sync, clean and rebuild your app. 如果您已经完成了这些操作,那么您所做的就是同步,清理和重建您的应用。 All the errors will go away. 所有的错误都会消失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM