草庐IT

package_test

全部标签

android - 文件 :///android_res/drawable not working when using flavor with other package name

我的问题是,在我将flavor添加到我的项目之后,包名称与实际源不同的flavor似乎无法访问android_res/drawable中的文件。更具体地说,我有一个调用以下图像的htmlView。图像显示在产品版本中,其包名称与java文件的目录相同,但它不适用于beta版本:productFlavors{production{packageName"com.company.myapp"}beta{packageName"com.company.beta"}}java文件所在的目录java/com/company/myapp发生这种情况很奇怪,因为资源甚至不在该文件夹中。

android - "No tests found"用于 Lollipop 及更高版本的仪器测试

我基于仪器的(espresso)测试无法在Lollipop+设备和模拟器上运行。它们可以在任何其他平台上正确运行。我和这个线程中的人有相同的症状-https://groups.google.com/forum/?fromgroups#!topic/adt-dev/QW5SuzQizNk我的测试在src/androidTest/java/我已经设置了testInstrumentationRunner'android.support.test.runner.AndroidJUnitRunner'测试类是@RunWith(AndroidJUnit4.class)个别测试用@Test注解我可以

android - 未找到输出 : error: resource style/TextAppearance. Compat.Notification.Info(又名 package_name :style/TextAppearance. Compat.Notification.Info)

切换到AndroidStudio3.2canary后,我收到以下构建错误。我看过this发布这个人有类似问题但没有提到解决方案的地方。我想尝试新的Material组件和喷气背包,所以有没有可能我不必切换回去。com.android.builder.internal.aapt.v2.Aapt2Exception:AndroidresourcelinkingfailedOutput:error:resourcestyle/TextAppearance.Compat.Notification.Info(akacom.nsnik.nrs.kotlintest.debug:style/TextA

android - java.lang.SecurityException : Permission Denial: getIntentSender() when using UiAutomation in a test 错误

每当我尝试使用UiAutomation在通过getInstrumentation().getUiAutomation()进行的任何测试中,进程崩溃并出现以下异常:java.lang.SecurityException:PermissionDenial:getIntentSender()frompid=30334,uid=2000,(needuid=1000)isnotallowedtosendaspackageandroidatandroid.os.Parcel.readException(Parcel.java:1540)atandroid.os.Parcel.readExcepti

android - react native 异常 java.lang.UnsatisfiedLinkError : dlopen failed: "/data/data/{package}/lib-main/libgnuSTL_shared.so" is 32-bit instead of 64-bit

我正在尝试将ReactNative与我现有的Android应用程序集成。初始化ReactNativeScreen时出现以下异常:java.lang.UnsatisfiedLinkError:dlopenfailed:"/data/data/com.snapdeal.main/lib-main/libgnustl_shared.so"is32-bitinsteadof64-bit应用程序仅在64位设备上崩溃。根据我目前的学习,我找到了这个issue在ReactNativeRepo上报告,但是solution此线程中的建议没有帮助,因为我没有在现有应用程序中使用任何外部SO库。除上述之外,

android - 使用 Jack 编译器时出错 - app/build/intermediates/packaged/debug/classes.zip' is an invalid library

我在使用Jack编译器时遇到这些错误,但我不明白是什么问题:Error:Libraryreadingphase:file'/Users/daniele.vitali/Development/android-studio/INTROCKAND/app/build/intermediates/packaged/debug/classes.zip'isaninvalidlibrarycom.android.jack.api.v01.CompilationException:Libraryreadingphase:file'/Users/daniele.vitali/Development/a

android - 测试运行失败 : Test run failed to complete. 预期 1 次测试,收到 0

我尝试为我的应用启动JUnit测试(robotium):publicclassMainTestextendsActivityInstrumentationTestCase2{privateSolosolo;publicMainTest(){super("nix.android.contact",MainActivity.class);//TODOAuto-generatedconstructorstub}protectedvoidsetUp()throwsException{super.setUp();solo=newSolo(getInstrumentation(),getActiv

android - 以编程方式安装具有来自/system/app 的 INSTALL_PACKAGES 权限的应用程序时遇到问题

我试图在没有用户交互的情况下以编程方式安装应用程序,但出现此错误SecurityException:Neitheruser10057norcurrentprocesshasandroid.permission.INSTALL_PACKAGES我的安装程序位于root手机的/system/app中,选中“安装非市场应用程序”,安装程序具有权限这是我的通话功能privatevoidpuk(Contextcontext)throwsIllegalArgumentException,IllegalAccessException,InvocationTargetException{Stringf

android - 找不到错误 :resource style/TextAppearance. Compat.Notification.Info(又名 {packageId}.test :style/TextAppearance. Compat.Notification.Info)

我刚刚将build.gradle编译SDK更新为27API。compileSdkVersion27buildToolsVersion'27.0.3'targetSdkVersion27但是一旦我点击同步按钮它就​​会抛出error:resourcestyle/TextAppearance.Compat.Notification.Info(aka{packageId}.test:style/TextAppearance.Compat.Notification.Info)notfound.error:resourcestyle/TextAppearance.Compat.Notificat

android - 在 Android Studio 项目上找不到参数的方法 test()

在我的Android应用程序中,我想在包中排除一些测试用例,以便我在build.gradle文件中使用test任务。例如:applyplugin:'com.android.library'test{exclude'**/calltest/Summary.class'}如果同步项目我得到以下异常:*Whatwentwrong:Aproblemoccurredevaluatingproject':SdkModule'.>Couldnotfindmethodtest()forarguments[build_4g3vf7b615x3x1p7i9ty0pt1l$_run_closure1@73d