草庐IT

method-call

全部标签

android - 为什么我得到 "call to OpenGL ES API with no current context"?

我是openGL和android开发的新手,所以如果我的问题很琐碎,请原谅我。我正在尝试构建一个简单的小应用程序,该应用程序在三个EditText中接受用户的输入,这些EditText表示要在GLSurfaceView中显示的RGB颜色的每个组件的0-100%值。要注意的是,我需要它来使用openGLES2.0,并且我需要使用统一值将数据传递到着色程序,这样一旦我让它工作,我就可以继续我真正想要完成的事情。运行我编写的内容后,我可以让GLSurfaceView正确显示第一个纯色,但是每当我更改任何值并调用重建着色程序中的统一插槽时,我都会在LogCat中收到此错误:错误/libEGL(

android - GLSurfaceView : Do I need to to call onPause/onResume?

我在RENDERMODE_WHEN_DIRTY中使用GLSurfaceView(sdk版本7)。文档说我需要调用onPause/onResume,但没有它它也能正常工作,所以我想知道。是必需的吗?如果我不这样做会发生什么? 最佳答案 GLSurfaceView的onPause的实现是这样的:/***Informtheviewthattheactivityispaused.Theownerofthisviewmust*callthismethodwhentheactivityispaused.Callingthismethodwill

javascript - Cordova javascript错误: has no method startsWith Android

我有两台设备,一台是Lollipop,一台是Kitekat...一台Lollipop没有报告任何错误,但是当我尝试我的应用程序时,我收到了这个错误:10-1316:56:56.126:I/chromium(6322):[INFO:CONSOLE(99)]"UncaughtTypeError:ObjectALIM.ILSOLEDILOPARDOMARIANGELAhasnomethod'startsWith'",source:file:///android_asset/www/soggetti3.html(99)这是我的javascript的一部分:functiononDeviceRea

java - Android 中的 "Cannot make a static reference to a non-static method"

我的Android程序中出现了一些旧错误“无法对非静态方法进行静态引用”的问题。我正在创建一个落沙游戏(类似于PowderGame),我创建了一个名为Control的类,用于在屏幕底部创建一个控制栏,其中包含一个用于画笔大小的slider(效果很好)和一个用于弹出允许用户选择所选元素的对话框。但是,当我从我的代码中调用DemoActivity.showDialog(2)时,它给出了对非静态错误的静态引用(DemoActivity是我的应用程序的主要Activity)。我也尝试将其更改为Activity.showDialog(2),但我得到了完全相同的错误!请帮忙,我做错了什么?这是我的

android - 无法解析符号 "Method"

我尝试在Android代码中执行一个简单的GET请求,我只是从Volley的官方网站复制了代码,但我收到一条错误消息:“无法解析符号“方法””。我的代码是这样的:publicvoidonReceive(finalContextcontext,Intentintent){//InstantiatetheRequestQueue.RequestQueuequeue=Volley.newRequestQueue(context);Stringurl=*****;//myURL//RequestastringresponsefromtheprovidedURL.StringRequeststr

android - ButterKnife 错误 : cannot find symbol method findRequiredViewAsType

我一直在使用ButterKnife。但是我有第一次看到的错误,没有找到解决方案。错误:Error:(24,36)error:cannotfindsymbolmethodfindRequiredViewAsType(Object,int,String,Class)我一如既往地尝试了bindView@BindView(R.id.menu_hamburgerIcon)ImageViewmenuHamburger;在gradle中也加入了:compile'com.jakewharton:butterknife:8.0.1'apt'com.jakewharton:butterknife-comp

android - java.lang.NoSuchMethodError : No virtual method zzait()Ljava/util/ArrayList; in class Lcom/Error? 错误

您好,我正在通过Udacity类(class)学习使用Firebase。我在运行我的应用程序时收到此错误并且对此一无所知。11-2316:48:34.9953947-3947/com.google.firebase.udacity.friendlychatE/AndroidRuntime:FATALEXCEPTION:mainProcess:com.google.firebase.udacity.friendlychat,PID:3841java.lang.NoSuchMethodError:Novirtualmethodzzait()Ljava/util/ArrayList;incl

android - java.lang.IllegalStateException : Calling View methods on another thread than the UI thread 错误

现在尝试在我的nexus4上使用Android4.4(Kitkat)打开webview时,我会收到此错误消息:CallingViewmethodsonanotherthreadthantheUIthread.;java.lang.IllegalStateException:CallingViewmethodsonanotherthreadthantheUIthread.com.android.webview.chromium.WebViewChromium.createThreadException(WebViewChromium.java:268)自从我更新到Android4.4我的

java - 为什么我在使用 Retrofit2 时得到 "Type okhttp3.Call does not have type parameters"?

我正在尝试按照本教程进行Retrofit2GettingStartedandCreateanAndroidClient.导入没问题compile'com.squareup.retrofit2:retrofit:2.0.0-beta3'compile'com.squareup.retrofit2:converter-gson:2.0.0-beta3'除了一件事,我可以很好地按照教程进行操作。我正在尝试创建GitHubServiceInterface我遇到了两个问题:Call说它不接受任何类型参数,我也不确定将Contributor放在哪里类,因为它根据教程仅声明为static,这是否意味

android - java.lang.NoSuchMethodError : No virtual method setTokenProvider 错误

每当我将com.google.firebase:firebase-firestore:19.0.0添加到Gradle并运行应用程序时,就会出现以下错误。E/AndroidRuntime:FATALEXCEPTION:mainProcess:meter.meter,PID:13588java.lang.NoSuchMethodError:NovirtualmethodsetTokenProvider(Lcom/google/firebase/internal/InternalTokenProvider;)VinclassLcom/google/firebase/FirebaseApp;o