Phonegap project to Eclipse - android

I could really use some help here.. I was using Phonegap build to build my (android) app with pretty much some JS, HTML5 and CSS.. I finished the project and was testing it by scanning the QR code and getting it on my android. Anyways all was fine and I was ready to upload to the android marketplace. After trying to upload the apk I got an error message saying the app was declared in debug mode (even though i never had debugging enabled in phonegap) after a little more research I then found out that I need to be running this in Eclipse and it needs to be signed. So I read the android documentation on signing and what not but I have no idea how to get over this hump.
I am like a lost puppy because I dont know eclipse and the app is finished. So I try to import my already done files into eclipse how I think I should be importing it and I get the error message that AndroidManifest.xml cant be found.. I have no idea the steps I need to take next, I am guessing I just need to import this puppy into eclipse so I can sign it and then I am assuming I will be able to upload to the marketplace?
Any advice for me knowing where I am in my project and what I need to do to get this off the ground? I am a complete noob and feel so lost.
[edit] it may be worth noting that I built this with Phonegap build and altough I do not have AndroidManifest.xml, I do have config.xml and all I really need to know is how to apply my signing key and I guess keep google marketplace from seeing it as being in "debug" mode.
Thanks for reading

Related

Getting "App Not Installed" message after attempting to install new version of Android app

I have an app that I developed wow like 8 to 10 years ago, but I have been updating it constantly at least once a year or so.
I'm actually in the process of completely redoing the app from scratch, and it's working great when I run it on my Android from my computer, but when I build it with a signing key on PhoneGap Build, I get the error message "App Not Installed." when I try to install the apk.
I've read through several other posts on the topic and I can attest:
I have plenty of storage space on the phone.
The new version number is larger than the old version number.
The signing key is the same as the original version.
I do not have any version of the app currently installed on my phone.
Any other ideas on what may be causing this?
I've removed all my plugins to take that out of the equation, but I still get the same error.
The original app was build with OnsenUI and Cordova.
The new app is build in Ionic 5.4.16, Cordova 9.0.0, and Android 8.1.0.
Something else I have noticed is that if I change the app id (com.company.appname) to anything else (i.e. com.company.appnamedev), it installs. I feel like this is very indicative of the issue, but I don't know what to do with it.
Very much appreciate any guidance to finding the problem.
Unfortunately this isn't going to be the answer many of you solution seekers are hoping for, but I got it to work. Based on Mike N.'s suggestion, I attempted to sign it locally and push it to my device with adb. In doing that, I was having trouble with remnants of two older plugins (onesignal and admob) that I had already removed from my config.xml file.
I'm really not sure why, but after I got rid of those old pieces in my package.json, I attempt to push it to phonegap build again and it was able to install. So, I guess the solution would be to make sure you have fully removed any plugins that may be causing problems.
Now the big trick - adding these pieces of functionality back in. But, the app compiles on PhoneGap Build and the signed file installs on my device now.
UPDATE: So, it turns out this is directly related to the one signal plugin I'm using. Still figuring out why, but when I added it back in, it works great locally, but when I attempt to build with PhoneGap Build and load it to my phone, I get the error "App Not Installed." At least I know what's causing it now.
I finally figured out the root of all my issues. As it turns out, I had another half baked app I started and had on my phone under a different name and app identifier, but I had temporarily dropped the same google-services.json and GoogleService-Info.plist files into that other app that I use for the one in question here.
After employing Mike N's suggestion, I got the error:
adb: failed to install mynewapp.apk: Failure [INSTALL_FAILED_DUPLICATE_PERMISSION: Package com.company.new attempting to redeclare permission com.company.new.permission.RECEIVE_ADM_MESSAGE already owned by com.company.old]
I uninstalled the old app that should not have had those files to begin with and everything installs and works great now. Hopefully this helps someone else out who encounters the same bizarre situation.
You can use My APK application and installing an apk using My APK Installer (MAI).
If there is an error, it will show the detail (like duplicate permission, provider, mismatch signature,...)

Android Studio / Play store - Released Version compiled successfully but crashes

I released an update of my app and encountered following problems:
The version I uploaded crashes because of a ClassCastException. Although when checking the code this can't be true.
Observations
Android Studio compiled successfully => no problemss occurred
PlayStore uploaded successfully => no problems occurred
The upload of the file is checked with a hash value of the apk isn't it? So this can't be the problem.
Can it be something in Android Studio? Is there some setting I can enable to check the release apk? To make sure nothing went wrong?
My solution was to recompile the app without any changes after a clean and it works again...
Question
Can anyone explain how this can happen?
Does anyone have tipps how I can avoid this? (besides always trying the release apk on my own phone... i must admit I don't do this, as I use my app in debug version permanently...)
This can happen from time to time when switching build types, or checking out a different branch of your repository if you don't clean your project.
My advice would be to always do a clean build when you perform either of these two actions, which will avoid the problem. It will not always be caught during an incremental compile because the cached code is still valid code (albeit with stale references).
Also, not testing your release version before publishing is a bad idea. Better to spend an hour making sure it works than release something that's no good for your users and could easily result in your app being uninstalled.

Generated Android APK gives 'App not installed' error

I'm trying to install a generated APK on my phone, but it's giving me 'App not installed' error. The app is not unsigned and everything regarding the keystore seems fine.
I also tried generating APK for a different app and then installing it on my phone and had no problems doing so, it worked immediately and gave me no errors. I also checked the permissions in Manifest file and the dependencies in gradle file, couldn't see anything wrong with that also.
The app does compile and runs when I do it via USB & Android Studio.
Does anyone know what to do? I'm probably just doing some stupid rookie mistake or something.
You can view the project on Github here.
EDIT: So I tried sending the apk file to a friend to see whether it's just me having this problem and that turned out to be the case. Still not quite sure why won't install on my phone, but at least others can get their hands on it :)

Why is "Generate Signed APK" disabled in Android Studio?

I know there are a bunch of questions about errors that occur when Generate Signed APK is invoked in Android Studio. However, I can't even get there!
I'm working with Unity and cough cough this is my first time trying to make an Android build. At first I thought maybe Unity would export an Eclipse build but it seems to be more up to date than that.
Anyway, I downloaded Android Studio, and loaded the project, but the button is disabled. I read somewhere about someone having to install gradle manually, but when I looked in the plugins folder of the app, gradle is there.
I thought it might be something to do with not having connected a key store but, apparently you're supposed to do that after you select Generate Signed APK.
Any ideas? Thank you, I'm tearing my hair out.

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.

Categories

Resources