achellies / maven-android-plugin

Automatically exported from code.google.com/p/maven-android-plugin
0 stars 0 forks source link

renameManifestPackage with android:run does not start the app #326

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install one app with the regular package com.package.alpha
2. Use renameManifestPackage in profile beta to rename the package at build 
time to com.package.beta
3. run it with: mvn clean package android:deploy android:run -Pbeta

What is the expected output?

com.package.beta/com.package.alpha.Activities.SplashScreenActivity should be run

What do you see instead?

No Activity is started. The log says: 

Attempting to start com.package.beta/.Activities.SplashScreenActivity on device 
9146BF542600F103 (avdName = null)

What version of maven-android-plugin are you using?

3.4.1

What are the complete output lines of "mvn -version" on your machine?

Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /usr/share/maven
Java version: 1.7.0_07, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.8.2", arch: "x86_64", family: "mac"

Please provide any additional information below.

Original issue reported on code.google.com by dirk.jae...@sumup.com on 28 Nov 2012 at 2:53

GoogleCodeExporter commented 9 years ago
I can reproduce the issue.

Original comment by jonasfa@gmail.com on 7 Dec 2012 at 5:23

GoogleCodeExporter commented 9 years ago
I've identified the problem.

This happens when the launcher activity is declared with relative package. eg: 
".ui.MyActivity". Relative packages are always relative to the manifest 
package, which is replaced when using "renameManifestPackage".
Adding the full package name to the launcher activity resolved the issue.

I think "renameManifestPackage" should add full package names to the Manifest's 
exported/public components.
What do you think?

Original comment by jonasfa@gmail.com on 7 Dec 2012 at 5:49

GoogleCodeExporter commented 9 years ago
Actually, it seems either "renameManifestPackage" or the Android SDK already 
does it. Otherwise the launcher icon wouldn't work.
So it's just the "run" goal that doesn't do.

Original comment by jonasfa@gmail.com on 7 Dec 2012 at 9:37

GoogleCodeExporter commented 9 years ago
I've just made a pull request that fixes this issue: 
https://github.com/jayway/maven-android-plugin/pull/160

Original comment by jonasfa@gmail.com on 8 Dec 2012 at 1:34

GoogleCodeExporter commented 9 years ago
We are no longer using the issue tracking system on Google Code. Please refile 
this issue on https://github.com/jayway/maven-android-plugin/issues if you 
still have this problem with the latest release of the Android Maven Plugin

Original comment by mosa...@gmail.com on 19 May 2014 at 4:19