Programing

"성공적인 빌드가 될 때까지 디자인 편집기를 사용할 수 없습니다"오류를 어떻게 해결할 수 있습니까?

lottogame 2020. 9. 22. 20:57
반응형

"성공적인 빌드가 될 때까지 디자인 편집기를 사용할 수 없습니다"오류를 어떻게 해결할 수 있습니까?


어제부터 Android Studio를 배우기 시작했습니다. 나는 간단한 "Hello World"를 반향하려고한다.

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    android:id="@+id/activity_main"
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingLeft="16dp"
    android:paddingRight="16dp"
    android:paddingTop="16dp"
    android:paddingBottom="16dp"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!" />

</RelativeLayout>

하지만 "디자인"보기를 클릭하면이 오류가 표시됩니까?

빌드가 성공할 때까지 디자인 편집기를 사용할 수 없습니다.

이 오류를 어떻게 해결할 수 있습니까? 어제 Android Studio를 다운로드했습니다.

여기에 이미지 설명 입력

여기에 이미지 설명 입력

내 xml 코드가 오류를 일으키는 것으로 나타났습니다. 이것이 작동하지 않는 이유입니다. 정말 고맙습니다


파일> Gradles 파일과 프로젝트 동기화로 이동합니다.


나를 위해 이것은 작동합니다

File -> Sync project with Gradle files

여기에 이미지 설명 입력


끝내기 Android Studio(닫지 프로젝트 QuitAndroid Studio) 다음 프로젝트를 열고로 이동Android Studio > Build > Clean Project

그런 다음 Android Studio > File > Sync Project with Gradles Files아래 그림으로

여기에 이미지 설명 입력

문제가 계속되면 아래 그림과 같이 빌드 도구 설치를 클릭 한 다음 Android Studio > File > Sync Project with Gradles Files

여기에 이미지 설명 입력


I faced same issue even after rebuilding my project multiple times successfully. I closed the project and re-opened, issue resolved.


None of the above worked for me. what worked for me is to go to File -> Invalidate Caches / Restart


Simple Solution It will Work For Sure

1.Select -->> File From Menu Bar and 2.Click On-->> Sync Project With Gradle File.

Thank You

@Ambilpura Sunil


Simply restart the Android Studio. In my case, I was offline before starting the Android Studio, but online when I did restart.


Do this

Build -> Rebuild Project


Go online before starting android studio. Then go file->New project Follow onscreen steps. Then wait It will download the necessary files over internet. And that should fix it.


Install missing plataform and sync project [press to install automatically]


I got this problem after i added a line in my build.gradle file.

compile 'com.balysv:material-ripple:1.0.2'

솔루션 : 이 줄을 다음과 같이 변경했습니다.

implementation 'com.balysv:material-ripple:1.0.2'

그런 다음를 누릅니다 sync again.

타다! 모두 다시 작동했습니다.


Android 스튜디오에서 파일을 클릭 한 다음 Gradle 파일과 프로젝트 동기화를 클릭하세요.

작동하지 않으면 빌드를 클릭하고 프로젝트 정리를 클릭합니다.

그것은 항상 나를 위해 일한다


Notepad ++에서 xml 파일을 편집하고 다시 빌드하십시오. 나를위한 일


SDK 버전을 변경하려고했습니다.

아래 이미지 확인 : Android P 에서 27변경했습니다.

Image

도움이 되길 바랍니다.


제 경우에는 매니페스트에 minSDK와 targeSdk를 남겨둔 것이 마음에 들지 않았기 때문입니다. 그림을 이동.

참고 URL : https://stackoverflow.com/questions/47289011/how-can-i-fix-design-editor-is-unavailable-until-a-successful-build-error

반응형