Bonjour la communauté, je suis debutant en Android studio. je suis en train de créer ma premiere application. Malheureusement le Bug Out ne fonctionne pas.
Can you please translate your post? The language in this forum is English.
Also, please never anywhere share screenshots of text if you only want to share the text and not something additional like colors or IDE annotations. Text in images is hard to read, especially on mobile, very hard to copy, and nearly impossible to search for.
Also your screenshot hides and cuts most of the error message, so probably hides important information. A build --scan URL if possible also always is helpful.
Unable to delete directory ‘C:\Users\glory\OneDrive\Bureau\FirstApp\app\build\intermediates\merged_res_blame_folder\debug\mergeDebugResources\out’
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
- C:\Users\glory\OneDrive\Bureau\FirstApp\app\build\intermediates\merged_res_blame_folder\debug\mergeDebugResources\out\multi-v2
- C:\Users\glory\OneDrive\Bureau\FirstApp\app\build\intermediates\merged_res_blame_folder\debug\mergeDebugResources\out\single
package com.example.firstapp
import android.os.Bundle
import android.widget.Button
import android.widget.EditText
import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val connect = findViewById<Button>(R.id.connect)
val adMail = findViewById<EditText>(R.id.adMail)
val motPass = findViewById<EditText>(R.id.motPass)
connect.setOnClickListener {
val textmail = adMail.text.toString()
val textpass = motPass.text.toString()
if (textmail.isEmpty()){
Toast.makeText(this, "Adresse e-mail invalide!", Toast.LENGTH_LONG).show()
}
if (textpass.isEmpty()){
Toast.makeText(this, "Mot de passe invalide!", Toast.LENGTH_LONG).show()
}
}
}
}
You still did not translate your text in your original question, please translate it there.
Maybe then it is also clear what your question is.
Because up to now you just posted a quite clear error message and some Kotlin code that seems totally unrelated.
I think the answer is already in the error, something is preventing the deletion of a directory during the build:
Unable to delete directory ‘C:\Users\glory\OneDrive\Bureau\FirstApp\app\build\intermediates\merged_res_blame_folder\debug\mergeDebugResources\out’
Failed to delete some children. This might happen because a process has files open or has its working directory set in the target directory.
You can try to restart Android Studio and also run ./gradlew --stop to kill any Gradle daemons.
You can also manual delete the build directory: app/build
