- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试将 Dagger2 与 Kotlin 结合使用,但出现无法追踪的错误。我已经尝试了很多方法来解决这个问题,但都不起作用。这是我通过 ./gradlew build --stacktrace 命令进行的跟踪:
e: /home/rahul/Documents/AndroidStudioProjects/RetailUser/app/build/generated/data_binding_base_class_source_out/debug/dataBindingGenBaseClassesDebug/out/com/retailuser/databinding/ItemFleetListingEmptyViewBinding.java:64: error: cannot find symbol
@Nullable DataBindingComponent component) {
^
symbol: class DataBindingComponent
location: class ItemFleetListingEmptyViewBinding
e: /home/rahul/Documents/AndroidStudioProjects/RetailUser/app/build/generated/data_binding_base_class_source_out/debug/dataBindingGenBaseClassesDebug/out/com/retailuser/databinding/ItemFleetListingEmptyViewBinding.java:73: error: cannot find symbol
@Nullable DataBindingComponent component) {
^
symbol: class DataBindingComponent
location: class ItemFleetListingEmptyViewBinding
e: [kapt] An exception occurred: java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at android.databinding.annotationprocessor.ProcessExpressions.onHandleStep(ProcessExpressions.java:77)
at android.databinding.annotationprocessor.ProcessDataBinding$ProcessingStep.runStep(ProcessDataBinding.java:203)
at android.databinding.annotationprocessor.ProcessDataBinding$ProcessingStep.access$000(ProcessDataBinding.java:188)
at android.databinding.annotationprocessor.ProcessDataBinding.doProcess(ProcessDataBinding.java:90)
at android.databinding.annotationprocessor.ProcessDataBinding.process(ProcessDataBinding.java:65)
at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:99)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:55)
at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:27)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:213)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:178)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:96)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:95)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:105)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:82)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:375)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:67)
at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:107)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:366)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:120)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:161)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:57)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:96)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:52)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:93)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:441)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:101)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:1020)
at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:101)
at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:1062)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:1019)
at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:440)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:kaptDebugKotlin'.
> Compilation error. See log for more details
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:kaptDebugKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: org.gradle.api.GradleException: Compilation error. See log for more details
at org.jetbrains.kotlin.gradle.tasks.TasksUtilsKt.throwGradleExceptionIfError(tasksUtils.kt:16)
at org.jetbrains.kotlin.gradle.internal.KaptWithKotlincTask.compile(KaptWithKotlincTask.kt:79)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:788)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:755)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
... 30 more
Build.gradle(应用程序)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply from: '../config/quality/quality.gradle'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "com.retailuser"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
debug {
buildConfigField("String", "BASE_URL", "\"http://www.mocky.io/v2\"")
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField("String", "BASE_URL", "\"http://www.mocky.io/v2\"")
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dataBinding {
enabled = true
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// android support libraries
implementation "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:recyclerview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:cardview-v7:$rootProject.supportLibraryVersion"
implementation "com.android.support:design:$rootProject.supportLibraryVersion"
implementation "com.android.support.constraint:constraint-layout:$rootProject.constraintLayout"
implementation "com.android.support:support-vector-drawable:$rootProject.supportLibraryVersion"
implementation "com.android.support:animated-vector-drawable:$rootProject.supportLibraryVersion"
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
kapt "com.android.databinding:compiler:3.1.4"
// image
implementation "com.github.bumptech.glide:glide:$rootProject.glideVersion"
// parser
implementation "com.google.code.gson:gson:$rootProject.gsonVersion"
// reactive
implementation "io.reactivex.rxjava2:rxjava:$rootProject.rxjava2Version"
implementation "io.reactivex.rxjava2:rxandroid:$rootProject.rxandroidVersion"
// dependencies for local unit tests
testImplementation "junit:junit:$rootProject.ext.junitVersion"
testImplementation "org.mockito:mockito-core:$rootProject.mockitoVersion"
testAnnotationProcessor "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
// UI Testing
androidTestImplementation "com.android.support.test.espresso:espresso-core:$rootProject.espressoVersion"
androidTestImplementation "com.android.support.test.espresso:espresso-intents:$rootProject.espressoVersion"
androidTestImplementation "org.mockito:mockito-core:$rootProject.mockitoVersion"
androidTestAnnotationProcessor "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
// view model
implementation "android.arch.lifecycle:extensions:$rootProject.lifecycle"
kapt "android.arch.lifecycle:compiler:$rootProject.lifecycle"
// dependency injection
implementation "com.google.dagger:dagger:$rootProject.dagger2Version"
kapt "com.google.dagger:dagger-compiler:$rootProject.dagger2Version"
kapt "com.google.dagger:dagger-android-processor:$rootProject.dagger2Version"
implementation "com.google.dagger:dagger-android-support:$rootProject.dagger2Version"
//mapbox
implementation "com.mapbox.mapboxsdk:mapbox-android-sdk:$rootProject.mapboxVersion"
//FloatActionButton
implementation "com.github.clans:fab:$rootProject.fab"
}
configurations.all {
resolutionStrategy.force "com.android.support:support-annotations:$supportLibraryVersion"
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
build.gradle(root)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Define versions in a single place
ext {
// Sdk and tools
minSdkVersion = 17
targetSdkVersion = 28
compileSdkVersion = 28
buildToolsVersion = '28.0.2'
// App dependencies
supportLibraryVersion = '28.0.0'
constraintLayout = '1.1.3'
gsonVersion = '2.8.2'
calligraphyVersion = '2.2.0'
glideVersion = '3.7.0'
roomDatabase = '1.0.0'
rx2FastAndroidNetworking = '1.0.1'
fab = '1.6.4'
// fab = '1.0.6'
mapboxVersion = '6.3.0'
dagger2Version = '2.14.1'
rxjava2Version = '2.1.9'
rxandroidVersion = '2.0.2'
placeholderviewVersion = '0.6.1'
debugDBVersion = '1.0.3'
timberVersion = '4.5.1'
lifecycle = '1.1.1'
// Test dependencies
junitVersion = '4.12'
espressoVersion = '3.0.1'
mockitoVersion = '2.15.0'
}
应用类
public class UserApp extends Application implements HasActivityInjector {
@Inject
DispatchingAndroidInjector<Activity> activityDispatchingAndroidInjector;
@Override
public void onCreate() {
super.onCreate();
DaggerAppComponent.builder()
.application(this)
.build()
.inject(this);
}
@Override
public AndroidInjector<Activity> activityInjector() {
return activityDispatchingAndroidInjector;
}
}
应用组件
@Singleton
@Component(modules = {AndroidInjectionModule.class, AppModule.class, ActivityBuilder.class})
public interface AppComponent {
void inject(RetailUserApp app);
@Component.Builder
interface Builder {
@BindsInstance
Builder application(Application application);
AppComponent build();
}
}
应用模块
@Module
public class AppModule {
@Provides
@Singleton
Context provideContext(Application application) {
return application;
}
@Provides
@Singleton
DataManager provideDataManager(AppDataManager appDataManager) {
return appDataManager;
}
@Provides
@Singleton
Gson provideGson() {
return new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create();
}
@Provides
@PreferenceInfo
String providePreferenceName() {
return AppConstants.PREF_NAME;
}
@Provides
@Singleton
PreferencesHelper providePreferencesHelper(AppPreferencesHelper appPreferencesHelper) {
return appPreferencesHelper;
}
@Provides
SchedulerProvider provideSchedulerProvider() {
return new AppSchedulerProvider();
}
}
ItemFleetListingEmptyViewBinding
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="viewModel"
type="com.retailuser.ui.fleetlisting.FleetListingEmptyItemViewModel" />
</data>
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="@dimen/dimen_30"
android:background="@color/white"
android:orientation="vertical"
app:cardCornerRadius="@dimen/dimen_7"
app:cardElevation="@dimen/dimen_4"
app:contentPadding="@dimen/dimen_10">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_vertical"
android:gravity="center"
android:orientation="vertical">
<ImageView
android:id="@+id/imageViewEmpty"
android:layout_width="@dimen/dimen_90"
android:layout_height="@dimen/dimen_90"
android:layout_gravity="center"
android:padding="@dimen/dimen_5"
app:srcCompat="@drawable/ic_frown_face" />
<TextView
android:id="@+id/tv_message"
style="@style/TextViewStyle"
android:layout_marginTop="@dimen/dimen_15"
android:gravity="center"
android:text="@string/empty_screen"
android:textColor="@color/gray" />
<!-- <TextView
style="@style/TextViewStyle"
android:layout_marginTop="@dimen/dimen_30"
android:text="@string/please_retry"
android:textColor="@color/gray" />-->
<Button
android:id="@+id/btn_retry"
style="@style/ButtonStyle"
android:layout_width="@dimen/dimen_120"
android:layout_marginTop="@dimen/dimen_15"
android:onClick="@{() -> viewModel.onRetryClick()}"
android:text="@string/retry"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
</android.support.v7.widget.CardView>
</layout>
我已经尝试清理并重建项目,但没有成功。任何帮助将不胜感激。
最佳答案
删除此行:kapt "com.android.databinding:compiler:3.1.4"
因为它包含在新版本中。
如果它不起作用,很少更改 annotationProcessor
的 kapt
你也可以看看这个answer
关于android - Kotlin Dagger2 - 找不到符号 DataBindingComponent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52782564/
这个问题在这里已经有了答案: How do I access an instance variable inside a BindingAdapter when using Android Data
我正面临这种幻像错误。我已经尝试了很多方法来解决这个问题,但没有任何效果。我不知道是什么产生了这个问题。这是我在构建日志中的错误: e: /Users/galihlarasprakoso/Projec
将我的整个项目迁移到 android x 后,我无法再编译它了。 我收到 100 个以下错误: e: M:\tmp\EverywhereLauncher\app\generated\data_bind
我在 Glide 成功渲染图像后更新 TextView 时看到此错误。 Fatal Exception: java.lang.IllegalStateException: Required DataB
在我的 agent_details_activity.xml 中: Activity 中: class AgentDetailsActivity : AppCompatActivity() {
我正在尝试将 Dagger2 与 Kotlin 结合使用,但出现无法追踪的错误。我已经尝试了很多方法来解决这个问题,但都不起作用。这是我通过 ./gradlew build --stacktrace
编译我的应用程序时,我在所有生成的 WhatFragmentOrActivityBinding 类上都收到以下错误: error: cannot find symbol protected Wha
我在 android studio 中构建时遇到了这个错误: Error:Execution failed for task ':app:transformResourcesWithMergeJava
我下载了一个 Android 项目,但出现了这个错误: Error:(42, 42) error: cannot find symbol class DataBindingComponent 示例导入
我在官方 API 文档中看到了 DataBindingComponent。 https://developer.android.com/reference/android/databinding/Da
我有一个项目,我在 android studio 3.3 中使用 dagger 版本 2.18(实现“com.google.dagger:dagger:2.18”) Beta 1 但是当我运行它时,它
我已经尝试解决这个烦人的问题太久了,但没有任何进展。 我们的应用程序有大部分类是用 Kotlin 编写的,我们也在使用数据绑定(bind): apply plugin: "kotlin-kapt"
我刚刚在启用了 Kotlin 的 Android Studio 3.3 Canary 3 上创建了一个新项目。然后我还启用了数据绑定(bind),但我收到一条错误消息,提示找不到 DataBindin
我刚刚在启用 Kotlin 的 Android Studio 3.2 Canary 16 上创建了一个新项目。然后我也启用了数据绑定(bind),但是我收到一个错误,说它找不到 DataBinding
我是一名优秀的程序员,十分优秀!