NewPartizal
NewPartizal

Reputation: 1104

Files under the "build" folder are generated and should not be edited error in kotlin

I'm trying to make a todo app where I use hilt,room,mvvm structure, but when I run the application, an error appears. What is the reason of this ?

AppModule_InjectRoomDatabaseFactory*

import android.app.Application;
import com.iebayirli.mvvmbase.service.NoteDatabase;
import dagger.internal.DaggerGenerated;
import dagger.internal.Factory;
import dagger.internal.Preconditions;
import dagger.internal.QualifierMetadata;
import dagger.internal.ScopeMetadata;
import javax.annotation.processing.Generated;
import javax.inject.Provider;

@ScopeMetadata("javax.inject.Singleton")
@QualifierMetadata
@DaggerGenerated
@Generated(
    value = "dagger.internal.codegen.ComponentProcessor",
    comments = "https://dagger.dev"
)
@SuppressWarnings({
    "unchecked",
    "rawtypes"
})
public final class AppModule_InjectRoomDatabaseFactory implements Factory<NoteDatabase> {
  private final Provider<Application> appProvider;

  public AppModule_InjectRoomDatabaseFactory(Provider<Application> appProvider) {
    this.appProvider = appProvider;
  }

  @Override
  public NoteDatabase get() {
    return injectRoomDatabase(appProvider.get());
  }

  public static AppModule_InjectRoomDatabaseFactory create(Provider<Application> appProvider) {
    return new AppModule_InjectRoomDatabaseFactory(appProvider);
  }

  public static NoteDatabase injectRoomDatabase(Application app) {
    return Preconditions.checkNotNullFromProvides(AppModule.INSTANCE.injectRoomDatabase(app));
  }
}

Error enter image description here

enter image description here

Upvotes: 0

Views: 541

Answers (1)

Gabe Sechan
Gabe Sechan

Reputation: 93542

That's not an error. That's a warning that you shouldn't edit that file, because it's generated at compile time and your changes would be overwritten when you compile again. It doesn't prevent you from running the app. If you actually want to edit that file, you need to change the file its generated from to do what you want rather than edit the generated code.

Upvotes: 1

Related Questions