Home > Mobile > Android Studio compile failure: reference to the findViewById not clear
Android Studio compile failure: reference to the findViewById not clear
Time:10-06
Android Studio 3.2.1 The classpath 'com. Android. Tools. Build: gradle: 3.2.1' Gradle - 4.6 - all.zip CompileSdkVersion 28 BuildToolsVersion '28.0.3' All depend on the Module corresponding compileSdkVersion have been unified for 28,
Compiled code not red, but not through: "not clear" citation to the findViewById,
Try File - & gt; Invalidate Caches/Restart File - & gt; Sync Project with Gradle Files Is void,
Somebody in?
CodePudding user response:
The code posted and have a look
CodePudding user response:
Kotlin or Java? Kotlin, the findViewById need to specify type:
Val textView: textView=view. The findViewById (R.i which extView) Or Val textView=view. FindViewById (R.i which extView)
Java:
TextView TextView=view. The findViewById (R.i which extView);