3

私はこれを実行しています:

 mvn clean install -Psign --debug

ビルド、署名などはすべて正常に動作します (テスト ビルドはアプリ ビルド、アプリ ビルドのインストール、テスト ビルドのインストールを検出でき、デバイスと通信できます)。

[INFO] SH175T502423_HTC_HTCSensation4G :   Running tests for specified test classes/methods: [com.myapp.app.test.RegistrationActivityTestCase]
[INFO] SH175T502423_HTC_HTCSensation4G :   Running instrumentation tests in com.myapp.app.test
[INFO] SH175T502423_HTC_HTCSensation4G :     Run started: com.myapp.app.test, 1 tests:
[INFO] SH175T502423_HTC_HTCSensation4G :       Start [1/1]: junit.framework.TestSuite$1#warning
[INFO] SH175T502423_HTC_HTCSensation4G :       FAILURE:junit.framework.TestSuite$1#warning
[INFO] SH175T502423_HTC_HTCSensation4G :       junit.framework.AssertionFailedError: Exception in constructor: testButtonVisibility (java.lang.NoClassDefFoundError: com.myapp.app.RegistrationActivity
at com.myapp.app.test.RegistrationActivityTestCase.<init>(RegistrationActivityTestCase.java:15)
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at junit.runner.BaseTestRunner.getTest(BaseTestRunner.java:103)
at android.test.AndroidTestRunner.getTest(AndroidTestRunner.java:127)
at android.test.AndroidTestRunner.setTestClassName(AndroidTestRunner.java:55)
at android.test.suitebuilder.TestSuiteBuilder.addTestClassByName(TestSuiteBuilder.java:80)
at android.test.InstrumentationTestRunner.parseTestClass(InstrumentationTestRunner.java:426)
at android.test.InstrumentationTestRunner.parseTestClasses(InstrumentationTestRunner.java:407)
at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:362)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4424)
at android.app.ActivityThread.access$1300(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:4944)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:537)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1677)

[INFO] SH175T502423_HTC_HTCSensation4G :       End [1/1]: junit.framework.TestSuite$1#warning
[INFO] SH175T502423_HTC_HTCSensation4G :     Run ended: 10 ms
[ERROR] SH175T502423_HTC_HTCSensation4G :     FAILURES!!!
[INFO]   Tests run: 1,  Failures: 1,  Errors: 0
[INFO] SH175T502423_HTC_HTCSensation4G :   Report file written to C:\workspace\android\myappTest\target\surefire-reports\TEST-SH175T502423_HTC_HTCSensation4G.xml
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:07.996s
[INFO] Finished at: Mon Jun 24 11:42:17 EDT 2013
[INFO] Final Memory: 22M/251M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:internal-integration-test (default-internal-integration-test) on project ecmobile-test: SH175T502423_HTC_HTCSensation4G :   Tests failed on device. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:internal-integration-test (default-internal-integration-test) on project ecmobile-test: SH175T502423_HTC_HTCSensation4G :   Tests failed on device.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoFailureException: SH175T502423_HTC_HTCSensation4G :   Tests failed on device.
        at com.jayway.maven.plugins.android.AbstractInstrumentationMojo$1.doWithDevice(AbstractInstrumentationMojo.java:407)
        at com.jayway.maven.plugins.android.ScreenshotServiceWrapper.doWithDevice(ScreenshotServiceWrapper.java:56)
        at com.jayway.maven.plugins.android.AbstractAndroidMojo$2.runDo(AbstractAndroidMojo.java:764)
        at com.jayway.maven.plugins.android.AbstractAndroidMojo$DoThread.run(AbstractAndroidMojo.java:1275)

Morseflash の例 ( https://github.com/jayway/maven-android-plugin-samples/tree/master/morseflash ) に関するすべてをミラーリングするために最善を尽くしましたが、まだこれを理解できません。

他の誰かが助けてくれることを願っています!

4

0 に答える 0