草庐IT

resolved

全部标签

android - "Cannot be resolved or is not a field"

自从我尝试android编程(这里是新手)以来,我一直遇到这个问题。最近2周前开始进行Android编程。对此进行测试(http://startandroid.ru/en/lessons/complete-list/225-lesson-19-creating-a-simple-calculator.html)并在R.id样本部分遇到问题:R.id.etNum1“etNum1无法解析或不是字段”这是我的代码:etNum1=(EditText)findViewById(R.id.etNum1);etNum2=(EditText)findViewById(R.id.etNum2);btnA

android - 构建项目后 "R cannot be resolved to a variable"错误消失

我突然收到“R无法解析为变量”错误。我阅读了关于此问题的另一个线程,它说要更新android构建工具以使错误消失,但这并没有解决它。但是由于某种原因,当我构建项目时错误消失了。这是怎么回事? 最佳答案 我发现这种情况发生在我身上,布局损坏。不用担心。我正在尽力为您提供解决方案:解决方案:确保R.链接到的任何内容都没有损坏。全部修复XML文件中的错误。如果ADK中的任何内容被破坏,R将不再生。如果你不知何故碰到了一些东西并在你的中创建了importandroid.RActivity,将其删除。运行Project->Clean。这将删除

android - 文本输入布局错误 : Couldn't resolve resource @string/path_password_strike_through

AndroidX:我正在尝试使用TextInputLayout,但是当我将它放入我的XML中时,我收到此错误:渲染问题:Couldn'tresolveresource@string/path_password_strike_through无法启动一个或多个类(class)Thefollowingclassescouldnotbeinstantiated:com.google.android.material.textfield.TextInputLayout这里是堆栈跟踪:java.lang.AssertionError:errorinparsing"g/"java.lang.Numb

安卓NDK : Function va_start/va_end could not be resolved

我试图在我的项目中使用va_start和va_end函数,但eclipse不想将其解析为函数。gcc编译整个项目没有错误...[我的文件.cpp]#include#include[...]inlinevoidShowDbgMsg(constchar*str,...){va_listargptr;va_start(argptr,str);vprintf(str,argptr);va_end(argptr);}[...][Android.mk][...]LOCAL_C_INCLUDES:=jni/pvrTools/jni/igel/$(STLPORT_BASE)/stlport[...]e

android - 错误 : [TAG] Failed to resolve variable '${project.version}'

我是android的初学者,所以请解释一下你的答案。我一直在尝试使用ButterKnife,但遇到了一些问题。我检查了许多建议迁移到androidx的答案。我这样做了,但我遇到了许多其他错误。实际上,当我构建项目时,没有出现任何错误。但是,当我尝试在应用程序中运行它时,会出现以下内容:ERROR:[TAG]Failedtoresolvevariable'${project.version}'还有这些:org.gradle.execution.MultipleBuildFailures:Buildcompletedwith1failures.atorg.gradle.initializa

安卓工作室 : Could not resolve com. google.code.gson :gson:2. 7

我是AndroidStudio的新手,我正在尝试用它做一个helloworld。我只是想看看如何使用build.gradle为我的App模块添加依赖项。添加行:编译'com.google.code.gson:gson:2.7'通过And到下面的build.gradle文件。螺柱。界面。又名“文件|项目结构。”>>---------------------------applyplugin:'com.android.application'android{compileSdkVersion23buildToolsVersion"23.0.3"defaultConfig{applicati

android - 使用ActionBarSherlock库报错 "R class can not be resolved"

我正在使用ActionBarSherlock为Android2.1平台实现操作栏。但在Eclipse中,无论我从下载的ActionBarSherlock库中导入现有项目,还是从下载库中创建新项目,我总是得到“Rcannotberesolved”。然后我注意到gen/文件夹下没有R.java文件。我试图清理项目,但没有帮助...任何人都可以帮助我如何摆脱这个ActionBarSherlock库? 最佳答案 ActionBarSherlock(v3.x)要求您使用Android3.2进行编译。您没有看到R.java文件的原因是您可能使用

android - 清理 ActionBarSherlock 创建 R cannot be resolved 错误

我最近(今天早上)在我的eclipse环境中更新了一堆android插件(这样我就可以切换到AndroidStudio),但是,我决定返回到Eclipse来完成一些事情。我不得不重新导入actionbarsherlock项目(4.2.0库)。导入后,确保它在Android4.2上运行并作为一个库,我清理了actionbarsherlock“库”项目。这导致了200多个“R无法解析为变量”问题。我已经尝试了所有常见的怀疑:在res文件中找不到任何错误,尝试以各种不同的顺序清理、刷新、关闭eclipse。我还注意到一个名为“AndroidPrivateLibraries”的新依赖项——我不

Android:在开关上使用 setOnCheckedChangeListener 时,我得到 'Cannot Resolve Symbol Error'

packagecom.example.koustav.myapplication;importandroid.app.Activity;importandroid.os.Bundle;importandroid.view.View;importandroid.widget.Switch;importandroid.widget.TextView;importandroid.widget.CompoundButton;importandroid.widget.CompoundButton.OnCheckedChangeListener;publicclassMainActivityext

android - Android 中的 "Cannot resolve symbol ' TAG '"使用来自 Google 的代码

我正在开发我的第一个应用程序,并且是第一次使用AndroidStudio(在您出于纯粹的傲慢态度否决我的问题之前请记住这一点)。该应用程序使用摄像头,我从Google借用了一些代码来实现这一点。但是,我收到一个错误:“无法解析符号‘TAG’”。为什么是这样?我该如何解决?代码fragment包括...publicvoidsurfaceCreated(SurfaceHolderholder){//TheSurfacehasbeencreated,nowtellthecamerawheretodrawthepreview.try{mCamera.setPreviewDisplay(hold