You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mvn clean verify
...
[INFO] --- android-maven-plugin:3.8.2:internal-integration-test (default-internal-integration-test) @ android-demo-it ---
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Device 4df19dd060da5f81_samsung_GT-I9300 found.
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Running tests for specified test package: com.company.demo.test
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Running instrumentation tests in com.company.demo.test
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Run started: com.company.demo.test, 1 tests:
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Start [1/1]: com.company.demo.test.HelloAndroidActivityTest#testActivity
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : End [1/1]: com.company.demo.test.HelloAndroidActivityTest#testActivity
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Run ended: 632 ms
[INFO] Tests run: 1, Failures: 0, Errors: 0
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Report file written to D:\workshop\Perso\repo\git\perso\android-demo-parent\android-demo-it\target-dev\surefire-reports\TEST-4df19dd060da5f81_samsung_GT-I9300.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] android-demo - Parent ............................. SUCCESS [0.163s]
[INFO] android-demo - Application ........................ SUCCESS [10.197s]
[INFO] android-demo-it - Integration tests ............... SUCCESS [29.012s]
[INFO] ------------------------------------------------------------------------
What do you see instead?
mvn clean verify
...
[INFO] --- android-maven-plugin:3.8.2:internal-integration-test (default-internal-integration-test) @ android-demo-it ---
[INFO] Found 1 devices connected with the Android Debug Bridge
[INFO] android.device parameter not set, using all attached devices
[INFO] Device 4df19dd060da5f81_samsung_GT-I9300 found.
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Running tests for specified test package: com.company.demo.test
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Running instrumentation tests in com.company.demo.dev
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Run started: com.company.demo.dev, 1 tests:
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Start [1/1]: android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests#testSuiteConstructionFailed
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : ERROR:android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests#testSuiteConstructionFailed
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : java.lang.RuntimeException: Exception during suite construction
at android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests.testSuiteConstructionFailed(TestSuiteBuilder.java:238)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:191)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:176)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:554)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1738)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
at android.test.suitebuilder.TestMethod.instantiateTest(TestMethod.java:87)
at android.test.suitebuilder.TestMethod.createTest(TestMethod.java:73)
at android.test.suitebuilder.TestSuiteBuilder.addTest(TestSuiteBuilder.java:262)
at android.test.suitebuilder.TestSuiteBuilder.build(TestSuiteBuilder.java:184)
at android.test.InstrumentationTestRunner.onCreate(InstrumentationTestRunner.java:379)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4675)
at android.app.ActivityThread.access$1400(ActivityThread.java:159)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: com.company.demo.HelloAndroidActivity
at com.company.demo.test.HelloAndroidActivityTest.(HelloAndroidActivityTest.java:9)
... 18 more
Error :
Caused by: java.lang.NoClassDefFoundError: com.company.demo.HelloAndroidActivity
at com.company.demo.test.HelloAndroidActivityTest.(HelloAndroidActivityTest.java:9)
Except I'm mistaken, the class HelloAndroidActivity should be always found in the package com.company.demo even thouth the manifest package is renamed.
--rename-manifest-package
Rewrite the manifest so that its package name is the package name
given here. Relative class names (for example .Foo) will be
changed to absolute names with the old package so that the code
does not need to change.
--rename-instrumentation-target-package
Rewrite the manifest so that all of its instrumentation
components target the given package. Useful when used in
conjunction with --rename-manifest-package to fix tests against
a package that has been renamed.
What version of maven-android-plugin are you using?
android-maven-plugin:3.8.2
What are the complete output lines of "mvn -version" on your machine?
What steps will reproduce the problem?
mvn archetype:generate -B -DarchetypeArtifactId=android-release -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.11 -DgroupId=com.company.demo -DartifactId=demo -Dversion=1.0.0-SNAPSHOT -Dpackage=com.company.demo -Dandroid-plugin-version=3.8.2 -Demulator=default -Dplatform=16
cd demo
mvn clean install => all is ok
< renameManifestPackage >${project.groupId}.foo.bar</ renameManifestPackage >
< renameManifestPackage >${project.groupId}.foo.bar</ renameManifestPackage >
< renameInstrumentationTargetPackage >${project.groupId}.foo.bar</ renameInstrumentationTargetPackage >
< test >
< instrumentationPackage >${project.groupId}.foo.bar</ instrumentationPackage >
</ test >
What is the expected output?
What do you see instead?
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : End [1/1]: android.test.suitebuilder.TestSuiteBuilder$FailedToCreateTests#testSuiteConstructionFailed
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Run ended: 24 ms
[ERROR] 4df19dd060da5f81_samsung_GT-I9300 : FAILURES!!!
[INFO] Tests run: 1, Failures: 0, Errors: 1
[INFO] 4df19dd060da5f81_samsung_GT-I9300 : Report file written to D:\workshop\Perso\repo\git\perso\android-demo-parent\android-demo-it\target-dev\surefire-reports\TEST-4df19dd060
da5f81_samsung_GT-I9300.xml
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] android-demo - Parent ............................. SUCCESS [0.112s]
[INFO] android-demo - Application ........................ SUCCESS [11.781s]
[INFO] android-demo-it - Integration tests ............... FAILURE [2:26.717s]
[INFO] ------------------------------------------------------------------------
Error :
Caused by: java.lang.NoClassDefFoundError: com.company.demo.HelloAndroidActivity
at com.company.demo.test.HelloAndroidActivityTest.(HelloAndroidActivityTest.java:9)
Except I'm mistaken, the class HelloAndroidActivity should be always found in the package com.company.demo even thouth the manifest package is renamed.
--rename-manifest-package
Rewrite the manifest so that its package name is the package name
given here. Relative class names (for example .Foo) will be
changed to absolute names with the old package so that the code
does not need to change.
--rename-instrumentation-target-package
Rewrite the manifest so that all of its instrumentation
components target the given package. Useful when used in
conjunction with --rename-manifest-package to fix tests against
a package that has been renamed.
What version of maven-android-plugin are you using?
android-maven-plugin:3.8.2
What are the complete output lines of "mvn -version" on your machine?
$ mvn --version
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:22+0200)
Maven home: d:\bin\apache-maven-3.1.1
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: c:\Program Files (x86)\Java\jdk1.7.0_45\jre
Default locale: fr_FR, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: