0

Using the PushSharpClient sample code I changed the package name from com.pushsharp.test to com.testPush. I searched and replaced all instances of the old name with the new one. When I try to debug run the application in Xamarin Studio (F5) on my Motorola XT389 device I get the following result:

Deployment failed because of an internal error: Could not find file 'S:\PushSharp-master\Client.Samples\PushSharp.ClientSample.MonoForAndroid\PushSharp.ClientSample.MonoForAndroid.Gcm\bin\Debug\com.pushsharp.test-Signed.apk'

And indeed the actual file is named com.testPush-Signed.apk' Where else do I have to change the file name - I have changed it in:

[assembly: Permission(Name = "com.testPush.permission.C2D_MESSAGE")] //, ProtectionLevel = Android.Content.PM.Protection.Signature)] [assembly: UsesPermission(Name = "com.testPush.permission.C2D_MESSAGE")]

[IntentFilter(new string[] { GCMConstants.INTENT_FROM_GCM_MESSAGE }, Categories = new string[] { "com.testPush" })]
[IntentFilter(new string[] { GCMConstants.INTENT_FROM_GCM_REGISTRATION_CALLBACK }, Categories = new string[] { "com.testPush" })]
[IntentFilter(new string[] { GCMConstants.INTENT_FROM_GCM_LIBRARY_RETRY }, Categories = new string[] { "com.testPush" })]

in PushService.cs

And the package name in the AndroidManifest.xml

And I can find no other references using search and find.

Simon N
  • 27
  • 3

2 Answers2

0

Those strings have nothing to do with the generated APK name. The APK name is solely generated from the Assembly name set in the project properties.

Cheesebaron
  • 24,131
  • 15
  • 66
  • 118
  • So where is the assembly name set other than in the AndroidManifest.xml? because that only has a package name which was set to com.testPush. This generates a signed name of com.testPush-signed.apk. The issue is that on debug install the install fails because it is looking for the OLD NAME com.pushsharp.test-Signed.apk. I need to know how to fix that issue. – Simon N Sep 17 '13 at 17:18
0

OK - there must have been some legacy files that were not recompiled on debug building. Once I deleted the obj and bin folders it rebuilt successfully.

Simon N
  • 27
  • 3