草庐IT

performance-reference

全部标签

Android - 尝试发送电子邮件时出现错误 "no application can perform this action"?

我正在制作一个应用程序,我将在其中向我的客户提供反馈功能。为了实现这一点,我创建了一个小对话框,用户可以在其中输入反馈并将其发送到我的邮件ID。我尝试了一些在互联网上找到的代码fragment,但每当我尝试从模拟器或实际设备发送电子邮件时,我都会收到错误消息“没有应用程序可以执行此操作”。这是我的代码:-publicvoidemailDialog(){AlertDialog.BuilderalertDialog=newAlertDialog.Builder(this);alertDialog.setTitle("Feedback");alertDialog.setMessage("Pl

android - 空指针异常 : Attempt to invoke virtual method 'int java.util.ArrayList.size()' on a null object reference

我是Fragments和自定义ListView适配器的新手。谁能帮帮我吗?我有我的Fragment我有我的ListViewpublicclassRecordingListFragmentextendsFragmentimplementsOnItemClickListener{ListViewmListView;TextViewemptyView;Buttonoptions,delete,edit;ArrayListrecordings=null;RecordingsListAdaptermAdapter;publicRecordingListFragment(){}@Overridep

android - java.lang.NullPointerException : Attempt to invoke virtual method 'java.io.File com.parse.ParsePlugins.getParseDir()' on a null object reference 异常

试图从Parse加载一个类,但是应用程序在我启动它时崩溃了!这是代码:ListViewlistview;Listob;ProgressDialogmProgressDialog;ArrayAdapteradapter;@OverrideprotectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.activity_big_board);newRemoteDataTask().execute();}privateclassRemoteDa

javascript - 推送通知cordova android中 undefined reference 错误onnotification

使用Cordova(ionicframework+angularjs)构建以使用推送通知请求Android设备。注册时successHandler()被触发并显示('ok')消息结果!为什么onNotification()方法没有被触发??。varpushNotification;document.addEventListener("deviceready",onDeviceReady,false);functiononDeviceReady(){pushNotification=window.plugins.pushNotification;setupNotificationsFor

android - ndk-build : undefined reference to . 。静态链接到 libxml.a 时出错

当我使用ndk-build工具编译我的单个c++源文件时,我得到了很多undefinedreferenceto...错误。作为记录,我在Linux主机系统上使用NDKr6。首先,我整天都在为这个问题苦思冥想,所以如果我遗漏了一些东西或解释得有点快,我深表歉意。请向我询问任何其他信息。我的源代码有很多我想静态链接到的依赖库。我在我的Android.mk文件中定义了所有不同的依赖库,如下所示:include$(CLEAR_VARS)LOCAL_MODULE:=LOCAL_SRC_FILES:=lib.aLOCAL_EXPORT_C_INCLUDES:=include$(PREBUILT_S

android - 如何在不出现 "cannot make a static reference to the non static method"编译器错误的情况下使用 runOnUiThread

我有一个主类;ClientPlayerextendsActivity{和服务LotteryServerextendsServiceimplementsRunnable{尝试在此服务的运行方法中使用RunOnUiThread时出现编译器错误,“无法对非静态方法进行静态引用”如何解决这个问题?这里显示了我如何使用代码;@Overridepublicvoidrun(){//ItriedbothClientPlayer.runOnUiThreadandLotteryServer.runOnUiThread//bothdon'tworkClientPlayer.runOnUiThread(new

安卓数据绑定(bind) : "Method references using ' .' is deprecated"

在我的应用中使用数据绑定(bind)时,我在编译时收到以下警告:Warning:Methodreferencesusing'.'isdeprecated.Insteadof'handler.onItemClick',use'handler::onItemClick'请在下面查看我的XML。请注意条件语句中的非常简单的消息,直到我更改“.”。到“::”。android:onClick="@{!active?handler::onItemClick:null}"由于onItemClick在条件语句中,它似乎将两个::中的第一个解释为条件的“else”语句。在第二个“:”上,我得到错误:ex

android - 来自 Fragment 的 DialogFrag#show() 抛出 "IllegalStateException: Can not perform this action after onSaveInstanceState"

明确地说,我已经阅读了关于“IllegalStateException:在onSaveInstanceState之后无法执行此操作”的十几个最重要的SO问题,并且我已经阅读了AlexLockwood关于该问题的博客文章http://www.androiddesignpatterns.com/2013/08/fragment-transaction-commit-state-loss.html所以我不是盲目地问这个问题。我有一个非常简单的用例,不涉及AsyncTask或任何后台处理。我有一个包含按钮的fragment。在按钮的onClickListener上,我创建了一个DialogFr

java - Kotlin Unresolved reference : println from gradle on the CLI

在kotlin函数返回崩溃之前放置println语句。堆栈跟踪:thufir@dur:~/NetBeansProjects/kotlin$thufir@dur:~/NetBeansProjects/kotlin$gradlecleanbuild--stacktracew:Classpathentrypointstoanon-existentlocation:e:/home/thufir/NetBeansProjects/kotlin/src/main/kotlin/example.kt:(14,5):Unresolvedreference:println>Task:compileKot

java - Kotlin Unresolved reference : println from gradle on the CLI

在kotlin函数返回崩溃之前放置println语句。堆栈跟踪:thufir@dur:~/NetBeansProjects/kotlin$thufir@dur:~/NetBeansProjects/kotlin$gradlecleanbuild--stacktracew:Classpathentrypointstoanon-existentlocation:e:/home/thufir/NetBeansProjects/kotlin/src/main/kotlin/example.kt:(14,5):Unresolvedreference:println>Task:compileKot