Android App installed through Signed APK from Eclipse is not opening - android

I am creating a signed APK.
Through eclipse I was able to create successfully install an app on to my Samsung Tablet. I used the same keystore to create another signed APK and install it and open it. I am able to install but not able to open it errors out. "Unfortunately App Name has stopped"
No Idea why it is not working. This has Google Maps. I am able to install the same app through eclipse via USB and open it. Works great. But when i try to make APK and install it, it fails to open.
Does anybody have a clue why? I'm not sure where the Google key should go or how to debug this issue any help would be appreciated

Probably your Google maps key are bound to your eclipse debug keystore. If you export a app from Eclipse maybe you used another keystore. And then you also need another Google maps key.

After I read some article I found what really is going on
java.lang.RuntimeException: Unable to get provider com.test.data.TestProvider: java.lang.ClassNotFoundException: com.test.data.TestProvider
So I tried so many suggestions like clean and build, setting java class path on properties, changing proguard and many more but this issue is not going away.
Thanks for those that helped me up to this.

Related

Xamarin Debug Keystore Seems to have Changed

I am developing an Android Application using Xamarin.Android in Xamarin Studio. It uses Google Play Game Services.
The project has run and tested find up until this point. Yesterday I upgraded my development PC from Windows 7 to Windows 8.1. In the process I also had to reinstall Xamarin Studio.
Now when my app attempts to connect to Google Play, it fails with error "RESULT_APP_MISCONFIGURED" which as far as I can tell means that my app is not properly authorized to access the Google Play API. However, nothing has actually changed.
I tested an older version of the app, and it is still able to connect to the Google Play API. Nothing in the code itself has changed, so I think it must be something to do with my recently upgrade of Windows, or the recent re-install of Xamarin Studio.
Any thoughts on what would help narrow down the problem? Is it possible the debug keystore has changed somehow?
An additional clue: when I attempt to build an deploy to a device that has the older, working version of the app on it, I get the following error:
Deployment failed because of an internal error: Failure
[INSTALL_FAILED_UPDATE_INCOMPATIBLE]
I then have to manually uninstall the old version before the new one can be deployed.
As has already been pointed out, the debug keystore won't be the same on all installations of Xamarin.Android. Which is expected behavior.
When using Play Services you want to create a keystore, preferably one for debug and one for release, or as different aliases in the same keystore (you figure that out).
Then you can make the build process automagically sign your app by adding some stuff to your .csproj file. You can read more about this in the docs.
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<AndroidKeyStore>True</AndroidKeyStore>
<AndroidSigningKeyStore>public.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>MyKeystorePassword</AndroidSigningStorePass>
<AndroidSigningKeyAlias>MyKey</AndroidSigningKeyAlias>
<AndroidSigningKeyPass>MyKeyPassword</AndroidSigningKeyPass>
</PropertyGroup>
You can make a similar block for Debug as well choosing either another alias or another keystore.
Yes, debug keystore is part of the Xamarin installation and it changes if you reinstall Xamarin. You need to update the key signature on Google console, this time create a keystore and keep it hidden, keep it safe (so to speak).

App crashes at .apk

The app I created is running great on emulator or on my device when i connect the cable, but when I create an .apk file (I am sending it to myself )and I try to run it on my device in crashes.
In the past it worked in other apps I created but on that case it wont.
I am using the .android/debug.keystore with its default key(android). I've tried to create a new keystore aswell but the app still crashes when I run the apk.
Does anyone have any experience with this kind of error - has any clue how to fix it?
Edit:
the bugSense tells me:
java.lang.NoClassDefFoundError: xx.xxx.xxxxx.xxxxx.CommonUtilities
at xx.xxxx.xxxxx.xxxxx.xxxxxx.onTabChanged(Tabs.java:617)
at xx.xxxx.xxxxx.xxxxx.xxxxxx.initialiseTabHost(Tabs.java:544)
at xx.xxx.xxxxx.xxxxx.xxxxxx.onCreate(Tabs.java:90)
there're two options to your NoClassDefFoundError
ProGuard is shrinking the file and removing/stripping out/re-compressing libraries that your app needs to work.
Your build path is not properly configured and a library you use is not being packed into the .apk
edit:
where's CommonUtilities being defined? External library?
The problem is that I was doing the export of the apk from right click->export!
You must do that kind of export on the final product when it is ready for release.
The right way to export when your app is still on development is right click on the project->Android Tools->Export Signed Application Package.
Many thanks to all for your help learned new things on android from that question.

Issue Importing .APK into Eclipse

I created a .apk outside of eclipse using tiggr mobile (http://gotiggr.com)
i have the downloaded .apk and need to sign it - so i thought about running it through eclipse then signing it that way
im having the worse trouble importing it into eclipse.
does anyone have any other suggestions on signing this? i keep getting this message when uploading:
Market does not accept apks signed with the debug certificate. Create a new certificate that is valid for at least 50 years.
Market requires that the certificate used to sign the apk be valid until at least October 22, 2033. Create a new certificate.
Market requires the minSdkVersion to be set to a positive 32-bit integer in AndroidManifest.xml.
thanks for your help!
It would be faster to get the source code into eclipse via retyping it than to try and unsign and explode the apk, edit the manifest, fool the tools and sign the package. The tools can be run at the command line anyways and eclipse would just make it harder.
One problem you have is that there are problems in your manifest. The market requires some attributes set in it that you did not need while doing developer builds. You can open up the apk with anything that will open a zip file. You can edit text files with notepad. You package them up with ant by recreating the build.xml by hand. The instructions for signing things is here:
Android Dev-Guide: Signing your Applications
But what a LOT of work... and I am guessing you will need to do this multiple times just for one release to get the manifest right. Then what do you do when you need to update your program?
Will the service not let you export the code in an easy to use way (because... wow... talk about evil)? Failing that cut and paste will save you time but you will almost certainly want to have it in eclipse or some IDE ready to make changes for your market release and build, package and to sign it.
That's not your issue. I suppose you compiled your app and now you're trying to publish it in the market. To do that, you need a private key whick in turn requires you to have a android market developer account.
Normally you can develop your app and install it into most devices but you can't submit apps to android market without a developer account.
If what you really want is only to import your app to eclipse, I suggest you to create a brand new android project and copy everything into it. It's easier and faster than adjusting everything!

My published Android application won't install onto devices from the android market

I have compiled my application using nbandroid with netbeans 7.0 on a mac. Then keysigned it with jarsigner and aligned it using zipalign. It uploaded to the market with no issue but it will not install on any device giving the error "invalid package file". I have searched many times, but I have only found solutions on how to fix the problem on the device itself. Does anybody know what might be going on here?
Many Thanks,
Daniel
My app had a similar problem. See this Android Signed APK showing incomplete
In the end, I created an alternative eclipse project, copied all the files from original project and signed it using the original key. Seems like this is some eclipse-android plugin issue.

Android: Distributing an .apk file to test and doesn't work

I am building an app using Eclipse. I got it to work on my device and I am trying to distribute it to a couple friends for them to test it on their phones, but I send them the same .apk I installed in my N1 and they aren't able to install it.
I tried sending them the version from inside the bin/ folder, extract it as an unsigned application or as a signed one, with the same results.
My SDK target is 1.6, so this isn't a problem, because both of them have 2.1+.
The main problem for me is that I have to test the application on real devices, since the emulators don't surf the net if I am connected to Internet through a proxy.
I use a Google keytool because I am using some Maps functionality, so I think that it could be in some way the source of the error, but I don't know what I have to do to fix this. Is it possible that the key is only valid for my device?
I thought that maybe the .apk wasn't working and I could only install it through my USB cable, but I was able to install my app from the same e-mail I sent to my friends.
Thanks in advance!!
Edit: I finally got hold of a friend's device and the error I got was the following, although I was able to install the app via Eclipse (USB cable).
WARN/PackageInstaller(3317): Parse error when parsing manifest. Discontinuing installation
But if the manifest was wrong, I wouldn't be able to install and run the app, right?
The Google Maps api has both debug and release keys. So if you are using a debug key and generate a release apk, then the Maps api key will be incorrect and your map won't load any tiles.
You should make sure you are using the Maps Api key generated from your release keystore, and export the app in release mode.
whats the logcat output when the instalation fails ?
you can connect to the device using a usb port or use a logcat app from the market

Categories

Resources