草庐IT

non-resolvable

全部标签

java - 编译器错误 : "Cursor cannot be resolved to a type"

我在搞记事本练习1。当我创建fillData方法时,出现“游标无法解析为类型”的错误这是我的代码:privatevoidfillData(){//getnotesfromDBandcreateitemlistCursorc=mDbHelper.fetchAllNotes();startManagingCursor(c);String[]from=newString[]{NotesDbAdapter.KEY_TITLE};int[]to=newint[]{R.id.text1};SimpleCursorAdapternotes=newSimpleCursorAdapter(this,R.

android - 房间持久性库 : Cannot resolve symbol Room

我使用具有以下gradle设置的AndroidStudio3.0Beta2我可以搜索RxRoom但没有创建Room类。按照说明AddComponents后,我不能在我的Fragment中使用Room类。这个类在单独的模块中,应用程序模块不包含任何房间库依赖项。错误在IDE中显示为“无法解析符号房间”。构建.gradleapplyplugin:'com.android.library'android{compileSdkVersion26buildToolsVersion"26.0.1"defaultConfig{minSdkVersion15targetSdkVersion26vers

android - 获取错误 "cannot resolve findViewById(int)'

我有一个主要Activity,当我按下一个按钮时,我被导航到一个滑动选项卡View。现在我想在这些选项卡中有一个ClickableButton并在按下按钮时呈现toast。这是我使用的代码:importandroid.os.Bundle;importandroid.support.v4.app.Fragment;importandroid.view.LayoutInflater;importandroid.view.View;importandroid.view.ViewGroup;importandroid.widget.Button;publicclasslaundryextend

java - `static` 和 `non-static` 字段在 Java Android 中获得更好的性能

我在Android上使用openGL2D开发游戏。因为我的View很复杂并且同时包含300-400个对象(游戏循环),所以很难获得性能级别。我非常了解java中的static和non-static字段:privatefinalstaticintNUMBER=10;和privatefinalintNUMBER=10;我的问题不是封装(作为OO)而是性能。static或non-static字段哪个更适合用于性能。我的想法是,对于我的大部分逻辑,我使用像float/int这样的原语。我为我所有的“View”创建了通用父类(superclass),这个类在性能范围内必须更高效:例子如下:/**

java - JNI/安卓 : call to non static method in Java from C++?

我得到了以下当前调用静态Java方法的JNI方法:voidbindToMarketBillingServiceJNI(constchar*inappID){JniMethodInfot;if(JniHelper::getStaticMethodInfo(t,"com/mycompany/games/js/TestsDemo","bindToMarketBillingService","(Ljava/lang/String;)V")){jstringstringArg1;if(!inappID){stringArg1=t.env->NewStringUTF("1");}else{stri

android - 谷歌播放服务 : Finished With Non Zero Exit Value 2

由于我的gradle内部出现问题,我无法让我的程序运行。我最近添加了依赖项:compile'com.google.android.gms:play-services:7.3.0'我的项目。我在我的项目中将它用于map。但是当我运行这个项目时,我得到了这个错误:Information:Gradletasks[:app:assembleDebug]:app:preBuildUP-TO-DATE:app:preDebugBuildUP-TO-DATE:app:compileDebugNdkUP-TO-DATE:app:checkDebugManifest:app:preReleaseBuil

java - "Cannot resolve symbol ` Facebook Graph API 请求 `"错误

我将最新的facebookSDK4.0.1包含到AndroidStudio项目中。我想执行GraphAPIreference中列出的基本图形API调用/*maketheAPIcall*/newRequest(session,"/me",null,HttpMethod.GET,newRequest.Callback(){publicvoidonCompleted(Responseresponse){/*handletheresult*/}}).executeAsync();但我无法导入Request类,出现错误CannotresolvesymbolRequest``。如何解决这个问题?我

android - 启用 androidX 导致 'Cannot change strategy of configuration ' :app:compile' after it has been resolved' error

我目前正在尝试将OpenId/Android-Apputh迁移到androidX并在执行所有更改后面临一个奇怪的问题gradle开始抛出以下错误:>Cannotchangestrategyofconfiguration':app:compile'afterithasbeenresolved.我添加之后android.enableJetifier=trueandroid.useAndroidX=true到'gradle.properties'提示我尝试记录所有可能的(使用println(cofigBlockName))配置block,发现在构建过程中未调用sourceSetsconfig

java - "Failed to resolve: com.google.firebase:firebase-core:9.0.0"

我想在我的android应用程序中使用firebase进行身份验证我创建了应用程序,然后下载了JSON文件并将其粘贴到应用程序文件夹中我将其添加到我的build.gradle>项目中//Top-levelbuildfilewhereyoucanaddconfigurationoptionscommontoallsub-projects/modules.buildscript{repositories{jcenter()}dependencies{classpath'com.android.tools.build:gradle:2.2.1'classpath'com.google.gms

Android gradle 构建错误 "finished with non-zero exit value 42",这是什么意思,我该如何解决?

我正在尝试在我认为是最新版本的androidstudio上运行一个较旧的项目。当我尝试运行或调试应用程序时,我收到2条错误消息。我有谷歌这个,没有找到可行的解决方案。错误1错误:错误:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'command'E:\AndroidStudio\Android\sdk\build-tools\21.1.2\aapt.exe''以非零退出值42结束错误2错误:任务':app:mergeDebugResour