gpt4 book ai didi

android - 导入 android.view.View;无法解析符号 'view'

转载 作者:行者123 更新时间:2023-11-29 23:05:14 25 4
gpt4 key购买 nike

在 android studio 3.4.1 onClick 监听器中,没有源,现在它显示 setOnEditorActionListener

bth.setOnEditorActionListener(new TextView.OnEditorActionListener() {
@Override
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
return false;
}
});

导入android.view.View;
无法解析符号“ View ”

这是一个工作项目,它显示了这个错误
如果我运行它会毫无问题地运行
我从另一台 PC 打开它,没有这样的问题。


我正在使用最新的android studio 3.4.1

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
//firebase
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'
//slider
implementation project(':library')
//glide
implementation 'com.github.bumptech.glide:glide:4.7.1'
//recyclerview gravity
implementation 'com.github.rubensousa:gravitysnaphelper:1.5'
// rating library
implementation 'com.github.ome450901:SimpleRatingBar:1.4.2'
//cardview
implementation 'com.android.support:cardview-v7:28.0.0'

//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'

//timber-logging interceptor
implementation 'com.jakewharton.timber:timber:4.7.1'

//round corner image
implementation 'com.makeramen:roundedimageview:2.3.0'

//Html tag remover
implementation 'org.jsoup:jsoup:1.11.3'

implementation 'com.google.code.gson:gson:2.6.2'

// dots indicator
implementation 'com.ryanjeffreybrooks:indefinitepagerindicator:1.0.10'
implementation 'com.tbuonomo.andrui:viewpagerdotsindicator:2.1.2'

implementation 'com.google.firebase:firebase-messaging:17.6.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

// for unit test
testImplementation 'com.squareup.okhttp3:mockwebserver:3.12.0'
testImplementation 'org.mockito:mockito-android:2.7.22'

implementation 'com.github.sharish:ShimmerRecyclerView:v1.3'


}

我尝试了无效现金并重新启动
重新启动电脑
重新安装android studio
但是没有结果
我的团队成员android studio confi
Android Studio 3.2.1
构建#AI-181.5540.7.32.5056338,构建于 2018 年 10 月 9 日
JRE: 1.8.0_152-release-1136-b06 amd64
JVM:JetBrains s.r.o 的 OpenJDK 64 位服务器 VM
Windows 10 10.0

我的安卓工作室

Android Studio 3.4.1
构建 #AI-183.6156.11.34.5522156,构建于 2019 年 5 月 2 日
JRE: 1.8.0_152-release-1343-b01 amd64
JVM:JetBrains s.r.o 的 OpenJDK 64 位服务器 VM
Windows 10 10.0


The project is from git

最佳答案

抱歉,来晚了,我遇到了同样的问题,经过数小时的搜索,我发现 View 类已损坏,您可以通过删除 SDK(android 28) 中的平台并安装一个新平台来解决问题, 希望这对 Goodluck 有帮助

关于android - 导入 android.view.View;无法解析符号 'view',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56630448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com