Android: Debug app-release.apk - android

I'm working in Android Studio 2.2 RC on OSX 10.11 , and after implementing In-App Billing, after having generated my app-release.apk and having installed it on my phone, I noticed that when the purchase is successful and Ads are removed from my App, something in a secondary Activity of mine, is causing a NullPointerException and Activity is not loading.
To figure out what is causing it, I need to somehow debug the app while the In-App Purchase is active (debug.apk won't let me complete iAP) so...
How do I debug a release apk that is installed on my phone?

Use the following steps:
Enable debug in your device and connect usb to your device use
command adb devices to list connected devices
use command adb -s "device id" logcat and hit enter
It will show you a lot of log message but don't worry. Just test your phone and it will show you the error. Use ctrl + z to stop the log and you can check your error.
Please read this link. It will help more. Hope this will help you.

Related

Crashlytics works on production but doesn't work on test

It's a weird situation. I have a react native app that has a test and production environment. On the production side, my app is correctly integrated with crashlytics. But when I try to integrate on test apk, I see only "App detected and we're waiting for a crash!"
SS
Test and prod use the same application, the only difference is google-service.json files. I've not found anything. Please help.
Some notes:
I've tried on emulator and physical devices.
When I try to see dashboard for prod build, I can see correctly.
I don't think that it is related by package versions(Because it works on prod). So I didn't put those.
I 've seen " Crashlytics automatic data collection DISABLED by API" with adb logcat -s FirebaseCrashlytics command
When running the app, if you see the "App detected and we're waiting for a crash!" message, that means that the SDK was able to connect with the back end. But something could be preventing the SDK from sending crashes.
The first thing to do would be checking if the mapping file contains the parameter firebase_crashlytics_collection_enabled and if it is set to false. Check this document.
If so, you can override this parameter opting in with the code:
Firebase.crashlytics.setCrashlyticsCollectionEnabled(true)

Error "Your transaction cannot be completed" when testing google play purchase

I am trying to purchase using a beta tester but i am getting this error.
This is an error that shows in google play window, after passing initial validations and after the user press subscribe button, so i guess it is not an code or configuration error.
Anyway i checked this link https://stackoverflow.com/a/22469253/2700303 and also downloaded the app from the store.
I check the "Learn more" link that comes with the error but nothing on that troubleshooting page helped.
The account used as a valid and active pay method.
I am running on a simulator, but google play comes with it for a reason, so i discard that also.
The rest of the suggestions say to use other device. My simulator is running API 28 so should be good enough.
In-app purchase must be tested with production build on real device.
Steps
Generate release build from Android studio.
Uninstall debug app from your device, or use adb uninstall.
adb uninstall {yourdomain}.{yourpackagename}
Install your release version to your device.
adb install app-release.apk
Update:
Check this answer for more details.
Update 2 :Please read more about Test Google Play Billing

Can't delete self-programmed app

Recently I bought a new computer and installed Android Studio on it. I transferred all te files necessary from my old computer so I could continue my work on my app.The code was built and ready to upload to my device, but I got the message ' INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES', and Android Studio advised me to uninstall my app from my phone and try again.Whe I tried this, I noticed the 'delete' button was greyed out, and in Settings -> Apps -> TestApp (name of my app) I noticed the buttons for 'Force quit', 'Move to SD-card', and 'Clear Cache' were all greyed out.Is there anything I can do to make my phone delete my app, and to enable these functions in the future?EDIT: after running adb uninstall mypackagename I got the result Failure [DELETE_FAILED_DEVICE_POLICY_MANAGER]. My app uses the Device Policy Manager for locking and unlocking the phone.
SOLVED: After looking up the error code, I found the solution here at StackOverflow.
Thank you very much everyone!
Try this command from adb, after connecting your phone to pc in usb debugging mode
adb uninstall yourapppackagename
Package name you can see from the app info in the phone or packageid from your app gradle file
After running adb uninstall mypackagename like Umar Hussain pointed out, I got the result Failure [DELETE_FAILED_DEVICE_POLICY_MANAGER]. My app uses the Device Policy Manager for locking and unlocking the phone.
After looking up the error code, I found the solution here at StackOverflow.

Cordova signed apk installs on device but only produces a blank screen

I built an android application and signed the apk following all the steps on this tutorial. Even though the APK builds successfully after installing it on a mobile device it fails to load. I only get a white blank screen. I've searched for solutions and tried most of the suggestions but with no luck.
I then decided to start the project from scratch and guess what? the problem still persists. What could I have possible done wrong? I don't really know where to look because I don't even get an error message.
Please help???
I would try debugging that with a tool like GapDebug (https://www.genuitec.com/products/gapdebug/). I would:
Download and install GapDebug.
Attach your device to your PC/Mac via a USB cable.
Deploy your APK to the device and run it.
In GapDebug, choose your app as the app you want to debug.
At this point you may already see one or more errors showing up in the GapDebug console. If not,
On the device, restart the app.
Check the GapDebug console for errors.

Application Install Unsuccessful-while installing app viaOTA

I have developed an application using Android SDK 1.5, application works well on Android Simulator.
Now, I am trying to install application on actual device. I don't have the Android device. So, I am going by OTA way.
For this, I have generated the self sign keystore using keytool utility.
And, using Eclipse's "Eclipse Signed Application package.." option I have generated the signed .apk file and moved it to my web server.
Also, i added MIME type on web server for .apk.
But, when I am trying to download and install the same application on device, application get downloaded and it also prompts for permission. After thag when I click on "Install", it fails with error Application Install Unsuccefull.
Interestingly, I test this url on simulator browser, and it worked perfectly well and application get installed successfully.
Even, I checked that, SDCard is there on device. Settings -> Applications and "Unknown sources" option is alos checked.
Am I clear to you all?
Any Idea what may be going wrong here?
Thanks and appreciate your response,
S.Satheesh
What happens if connect the phone via a USB cable and install the application using the adb install command? Testing this will allow you to determine if the problem is with the package or the over the air update.
Also, you could try running adb logcat to view the logs from your phone after the failed install as this should show you what the problem is.

Categories

Resources