草庐IT

current_account

全部标签

android - ActionBarSherlock 给出了大量的 "Call requires API level 11 (current min is 7)"错误

我下载了ActionBarSherlock4.0.3,解压缩并从library文件夹创建了一个新项目。src文件夹,根据Eclipse,充满了错误,所以我按照网上的各种说明,如添加android-support-v4.jar,将目标API设置为15和编译器合规级别为1.6。尽管如此,该项目仍有194个错误,所有这些都是“调用需要API级别11(当前最低为7)”。因此,当我查看其中一个错误时,我会看到:@OverridepublicvoidinvalidateOptionsMenu(){getSherlock().dispatchInvalidateOptionsMenu();}publ

android - 无法使用错误 : There's another emulator instance running with the current AVD 启动 android 模拟器

使用CLI并使用以下命令运行模拟器:./emulator-use-system-libs@Nexus5API25只显示错误,模拟器不启动。emulator:ERROR:There'sanotheremulatorinstancerunningwiththecurrentAVD'Nexus5API25'.Exiting...还有:没有任何正在运行的模拟器实例。Nexus5API25确实存在并且过去一直在工作。我必须在我的机器上使用-use-system-libs标志来启动模拟器实例。其他AVD正在运行。当使用-verbose执行时,会打印更多详细信息,但我没有看到任何可以帮助我解决问题的

android - 应用内购买 : get the name or ID of the Google Play account that's requesting a purchase

我想获取进行购买的用户的姓名/ID。如果可能,我想不使用AccountManager,因为它的使用需要额外的权限。即使使用AccountManager我也看不到确定当前帐户的方法,因此欢迎提供任何建议。 最佳答案 我认为这是不可能的。在联系Google支持之前,我尝试了所有可能的方法。我得到的回复是这样的:ThanksforcontactingGooglePlayDeveloperSupport.PleasenotethatGoogledoesnotprovideaccesstoanyconfidentialuserinformat

android - 在创建 android 通知时,在 PendingIntent 中使用 FLAG_UPDATE_CURRENT 时会重复 Intent 额外内容

我想创建多个通知来启动(或刷新)Activity以显示产品描述。Notificationnotification=newNotification(R.drawable.applicationicon,Resources.getString("NewSaleNotification",context),System.currentTimeMillis());//Hidethenotificationafteritsselectednotification.flags|=Notification.FLAG_AUTO_CANCEL;Intentintent=newIntent(context

android - ionic 2/ ionic 3 : How to get current location of a device

stackoverflow上的所有答案都不适合我。其中很多是针对Ionic1的,或者这些答案已被弃用,或者它们不适用于Android设备。我在stackoverflow上看到了很多关于获取设备当前位置的解决方案,但似乎没有一个适用于Android。我尝试过的:-使用geolocation.getCurrentPosition(),适用于IOS和browser但不适用于Android.使用this.geolocation.watchPosition(),适用于IOS和browser但不适用于Android。使用navigator.geolocation.getCurrentPositio

android - 设置适配器 "Call requires API level 11 (current min is 8): android.widget.AbsListView#setAdapter"?

我正在调用setAdapter()扩展Fragment的类中的方法.注意我已经导入了android.support.v4.app.Fragment.但我收到一条错误消息,指出API级别必须为11级。我必须做些什么才能在不更改minSdkVersion="8"的情况下解决此问题至minSdkVersion="11"packagefoo.bar.qux;importjava.util.Calendar;importjava.util.Date;importorg.w3c.dom.Document;importorg.w3c.dom.NodeList;importandroid.suppor

android - 模拟器 : emulator: ERROR: x86 emulation currently requires hardware acceleration! 模拟器:进程以退出代码 1 完成

Emulator:emulator:ERROR:x86emulationcurrentlyrequireshardwareacceleration!Emulator:Processfinishedwithexitcode1 最佳答案 我遇到了完全相同的问题。这就是我修复它的方式(对于Windows):进入AndroidStudio并打开SDK管理器(在工具菜单下)在SDK平台选项卡下,取消选中任何选中的框。如果选中任何框,则表示它们已安装-但我们现在想卸载它们。转到SDK工具选项卡。确保选中AndroidEmulator、Andro

android - FragmentStatePagerAdapter IllegalStateException : <MyFragment> is not currently in the FragmentManager

在onResume()的某些情况下,我在使用FragmentStatePagerAdapter的Activity中得到了这个。使用设备的后退按钮时。不总是。不可重现。我正在使用支持包v4,最新版本(8)。已经用谷歌搜索过,没有找到有用的答案。查看源码,这里抛出的是:FragmentManager.java@OverridepublicvoidputFragment(Bundlebundle,Stringkey,Fragmentfragment){if(fragment.mIndex但是为什么fragment的索引实例化fragment的代码:@OverridepublicFragmen

Android 应用在 addAccountExplicitly(account, password, null) 上崩溃;

基本身份验证成功后,我想添加一个帐户以供以后使用。当我尝试使用以下代码创建此帐户时:AccountManageraccountManager=AccountManager.get(getBaseContext());finalAccountbasicAccount=newAccount(mEmail,"com.example");accountManager.addAccountExplicitly(basicAccount,mPassword,null);当调用addAccountExplicitly(...)时,应用程序崩溃并出现以下错误:E/AndroidRuntime:FATA

android - 使用 GCM 时获得 GET_ACCOUNTS 权限 - 为什么需要这样做?

我有一个应用,实现了推送通知。我想了解在实现GCM时为什么需要“GET_ACCOUNTS”(android.permission.GET_ACCOUNTS)的原因?一些用户对此权限表示担忧。我已在list中使用此权限,因为它在官方网站here中给出.这个权限有多安全?如果我从list中删除它,推送通知会起作用吗? 最佳答案 ItusesanexistingconnectionforGoogleservices.Forpre-3.0devices,thisrequiresuserstosetuptheirGoogleaccounton