草庐IT

application-client

全部标签

android - 无法启动快捷方式 : Application is not installed on your phone

我正在尝试为我的AndroidActivity之一创建桌面快捷方式。我使用的代码适用于我读过的每个tuto示例:finalIntentshortcutIntent=newIntent(Intent.ACTION_MAIN);ComponentNamename=newComponentName(getPackageName(),".MyActivity");shortcutIntent.setComponent(name);shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);shortcutIntent.addFlags(Inte

android - 无法解析导入 com.google.api.client.json.gson.GsonFactory

我正在尝试在我的应用中使用GsonFactory类:StudentApi.Builderbuilder=newStudentApi.Builder(AndroidHttp.newCompatibleTransport(),newGsonFactory(),null);但它说cannotresolvesymbol'GsonFactory'我的课上有importimportcom.google.api.client.json.gson.GsonFactory;但是gson无法解析,所以我尝试了Alt-Enter-Findjaronweb但找不到库。我的build.gradle依赖项中有这个

android-activity - Application 子类中的 startActivity

我有一个小的Android应用程序,我在其中直接指定我的应用程序并在ApplicationSubclass的onCreate中进行一些应用程序范围的设置,但是我收到以下错误(注意,我知道FLAG_ACTIVITY_NEW_TASK):Causedby:android.util.AndroidRuntimeException:CallingstartActivity()fromoutsideofanActivitycontextrequirestheFLAG_ACTIVITY_NEW_TASKflag.Isthisreallywhatyouwant?atandroid.app.Conte

android - 如何解决 "Warning: debug info can be unavailable. Please close other application using ADB: Restart ADB integration and try again"

我在尝试通过USB连接到外部设备调试Android应用程序时遇到了一个小问题。我不断收到错误消息“警告:调试信息可能不可用。请使用ADB关闭其他应用程序:Monitor、DDMS、Eclipse重新启动ADB集成并重试等待过程:"我试过在任务管理器中停止adb.exe,关闭androidstudio并重新启动,取出电缆并将其放回原处并转到工具=>android取消选中adb集成,然后重新检查它。一切都无济于事 最佳答案 这是ADB连接的问题,因为有时ADB会在您的真实/虚拟设备上缓存死连接,因此端口繁忙,您无法连接到它。最简单的解决

android - 应用程序崩溃 “android.app.Application cannot be cast to”

我发现了ORMlite。所以,我有这个DAO工厂类publicclassDtoFactoryextendsApplication{privateSharedPreferencespreferences;privateDatabaseHelperdatabaseHelper=null;privateDaoreleveDAO=null;@OverridepublicvoidonCreate(){super.onCreate();preferences=PreferenceManager.getDefaultSharedPreferences(this);databaseHelper=new

android - getDrawingCache while NoTitleBar style set for the application in Android

在我的list中,我指定(针对整个应用程序)样式:android:theme="@android:style/Theme.NoTitleBar"然后在我的应用程序中,我想使用绘图缓存创建应用程序的屏幕截图:ViewactivityView=getActivity().getWindow().getDecorView().findViewById(android.R.id.content);activityView.setDrawingCacheEnabled(true);BitmapcurrentScreen=Bitmap.createBitmap(activityView.getDr

android - java.lang.NoClassDefFoundError : com. google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential 错误

我正在尝试在我的androidApplciation中实现GoogleDrive,并得到java.lang.NoClassDefFoundError:com.google.api.client.googleapis.extensions.android.gms.auth.GoogleAccountCredential错误,所以任何人都知道如何解决这个问题。我现在还在试成功导入GoogleDrive所需的所有.jar导入GooglePlay服务库。在我的项目中成功试图重新启动eclipse并检查,但同样的错误出现了从Android的GoogleDriveAPI或Play服务获得APIke

ElasticSearch7.16通过Java API Client与SpringBoot整合

一、环境准备-ElasticSearch和Kibanaelasticsearch7.16.2官方下载地址:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-16-2kibana7.16.2官方下载地址:https://www.elastic.co/cn/downloads/past-releases/kibana-7-16-21.windows系统选择下载windows-x86_64.zip后解压,先双击bin\elasticsearch.bat运行elasticsearch2.等待访问localhost:920

Spring MVC学习随笔-控制器(Controller)开发详解:接受客户端(Client)请求参数

学习视频:孙哥说SpringMVC:结合Thymeleaf,重塑你的MVC世界!|前所未有的Web开发探索之旅第三章、SpringMVC控制器开发详解3.1核心要点💡1.接受客户端(client)请求参数[讲解]2.调用业务对象3.页面跳转3.2控制器接受客户端(client)请求参数详解3.2.1回顾:Web开发中如何接受Client请求参数3.2.2基于ServletAPI接受Client请求参数@Controller@RequestMapping("/param")publicclassParamController{@RequestMapping("param1")publicStri

android - 一小部分用户在 Application 类中出现 java.lang.VerifyError

(这不是其他类似问题的重复,因为这只发生在一小部分用户身上,我无法重现)在我最新的生产版本中,我突然看到java.lang.VerifyError类崩溃的巨大峰值来self的Application类中的一行。这行很简单:Settings.init(this);Settings是围绕SharedPreferences的便利包装类。似乎只有不到1%的用户找不到该类。我们无法在我团队的任何设备上重现崩溃,GooglePlay的预发布报告显示0个错误。这是完整的堆栈跟踪:java.lang.VerifyError:atcom.my_package.MyApplication.onCreate(