草庐IT

test_utility

全部标签

Android 应用内计费 : Error consuming sku android. test.purchased(响应:5:Developer Error)

我已经通过标准助手发送了测试购买意向:StringSKU="android.test.purchased";mHelper.launchPurchaseFlow(this,SKU,10001,mPurchaseFinishedListener);购买成功,但当我尝试使用以下方式消费购买的商品时:mHelper.consumeAsync(inv.getPurchase(SKU),mConsumeFinishedListener);我收到以下错误:Errorwhileconsuming:IabResult:Errorconsumingskuandroid.test.purchased(re

java - Android 项目构建成功但运行失败,错误为 : java. util.zip.ZipException:重复条目

我已经更新了我的androidstudio和SDK以及一些关于项目等级的包依赖项,从那时起我遇到了很多问题,我认为原因是依赖项之间不兼容。根据我的研究,我发现很多人都有同样的问题,而且这种情况并不少见。我已经解决了一些错误,但问题一个接一个地出现,我很困惑。希望你能帮我找出问题所在及其解决方案。代码在新的安卓版本上运行良好!(有点奇怪)我可以在android21+上编译和运行应用程序。但是当我尝试在低于21的安卓版本上运行它时,它给我一个错误。在我迁移到Androidstudio2之前一切正常。这是我现在得到的错误代码:FAILURE:Buildfailedwithanexceptio

android - 如何将Java.util.calendar设置为 future 的特定时间段

我正在使用Java的日历在特定日期和时间设置闹钟。当用户选择特定日期和时间时,我知道如何进行这项工作。例如,如果用户想在2013年7月17日上午10:45设置闹钟,我使用以下代码://Getthecalendarinstance.Calendarcalendar=Calendar.getInstance();//Setthetimeforthenotificationtooccur.calendar.set(Calendar.YEAR,2013);calendar.set(Calendar.MONTH,6);calendar.set(Calendar.DAY_OF_MONTH,17);

android - java.util.zip.ZipException : duplicate entry

我一整天都在AndroidStudio中与这个错误作斗争。项目是从eclipse解决方案导入的。我一直在尝试实现为类似帖子列出的所有修复程序,但没有任何效果。我是Android初学者。我很乐意提供任何进一步的信息。错误:任务':app:packageAllDebugClassesForMultiDex'执行失败。java.util.zip.ZipException:duplicateentry:com/google/zxing/BarcodeFormat.class请帮忙!!我应该尝试让它在Eclipse中运行吗?//Top-levelbuildfilewhereyoucanaddco

android - 如何解决java.util.zip.ZipException duplicate entry : com/google/gson/annotations/Expose.类?

我已经使用fabrik插件实现了Twitter登录,在设置Twitter集成后我遇到了这个问题,有人可以告诉我这有什么问题吗?我已经粘贴了我的gradle和logcat。渐变代码buildscript{repositories{maven{url'https://maven.fabric.io/public'}}dependencies{classpath'io.fabric.tools:gradle:1.+'}}applyplugin:'com.android.application'repositories{maven{url'https://maven.fabric.io/pub

android - Espresso : How can I test that the activity finished with result RESULT_OK?

在我的应用程序中,当用户单击“注册”按钮时,将启动RegisterActivity。用户填写表单后,详细信息将发布到Web服务,如果注册成功,RegisterActivity将以RESULT_OK结束。下面的代码示例总结了这一点:publicvoidsubmitRegistration(){showProgressDialog(R.string.registration,R.string.please_wait);getWebApi().register(buildRegistrationFromUI(),newCallback(){@Overridepublicvoidsuccess

android - 如何在 Espresso Test Android Studio 的软键盘模拟器上按下 "search button"

如何在EspressoTestAndroidStudio中按下软键盘模拟器上的“搜索按钮”?它在右下角。screenshotofemulator 最佳答案 使用此处记录的pressImeActionButton()ViewAction:https://developer.android.com/reference/android/support/test/espresso/action/ViewActions.html#pressImeActionButton()onView(withId(R.id.search_box)).per

android - Dx 不支持的类文件版本 52.0 ...在解析 com/example/test1/BuildConfig.class 时

关闭。这个问题需要detailsorclarity.它目前不接受答案。想改进这个问题吗?通过editingthispost添加细节并澄清问题.关闭6年前。Improvethisquestion尝试使用JDK1.8和eclipseneon构建项目时出现以下错误:[2016-07-0302:40:59-Test1]DxPARSEERROR:[2016-07-0302:40:59-Test1]Dxunsupportedclassfileversion52.0...whileparsingcom/example/test1/BuildConfig.class[2016-07-0302:40:5

java - android.util.Base64 编码/解码标志参数

根据Javadoc,android.util.Base64.decode()有两个参数:文本和“标志”。这些标志采用int形式并且(我引用):flags控制解码输出的某些特征。传递DEFAULT以解码标准Base64。首先,感谢决定编写模糊Javadoc的人。我看到Base64有一些枚举字符串,在实践中,我们一直在使用Base64.NO_WRAP作为我们的标志。然而,在这个特定实例中,我们需要使用两个标志:NO_WRAP和URL_SAFE。我们如何指定这两个标志?我们尝试用竖线('|')将它们分开,但没有成功。importandroid.util.Base64;publicclassF

java - 命令 "echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a"失败并以 1 退出

我是Travis和android开发的新手,由于我指出的错误标题,我的构建失败了,我一直在阅读文档并尝试实现它,但构建仍然失败。我失败构建的链接如下https://travis-ci.org/huxaiphaer/ConvergeLevelApp下面是Travis上的错误。$java-Xmx32m-versionjavaversion"1.8.0_144"Java(TM)SERuntimeEnvironment(build1.8.0_144-b01)JavaHotSpot(TM)64-BitServerVM(build25.144-b01,mixedmode)$javac-J-Xmx3