Recently, I tried to build an empty activity app using Android Studio for some poc purposes. I connected the app to a physical device through USB. When running the app, it is working on the device just fine except that it does not save the app to the device.
Whereas when I created the app using basic activity and run in the device, it saves the app on my device's screen and installed it into the memory.
Does anybody know the reason and solution for this?
FYR, I am using Huawei VOG-L29 as the device for testing.
You missed the app in the device somehow. The template you use to create the initial project doesn't matter- its not part of the final build. Android Studio doesn't even remember it once it's done generating the initial files. When you upload an app to the device, it will be saved to internal storage and should appear in settings.
Related
I created a simple Xamarin ANDROID App. I set up my phone to development mode and deployed my app to the phone via USB.
The app continues to work on the phone as a regular app.
I then created a Xamarin MOBILE App which was more complex. I deployed it to my android phone via Visual Studio debug mode as with my previous app and it ran perfectly. But when I attempt to run the app directly from my phone, it won’t run. The first screen partially loads without anything on it and then disappears. My phone puts a message up saying that my app keeps stopping and would I like to close the app. I make use of a file placed in Assets. Might this be an issue when not debugging from the computer?
Might there be a difference between deploying a xamarin android app and a xamarin mobile app.
A minor thing is that it has added the name ‘.droid’ to the name of my app which I would like to get rid of.
I am new to deploying apps to a phone
I have solved it thanks to your helpful prompts.
I looked at the error logs and the error was ‘FATAL’ in a mono dll. This was indirectly helpful in that I knew it wasn’t the logic in my code.
I also made the discovery that running my app directly in the emulator also failed in the same manner as on my phone. I also ruled out that it might be an issue with transferring an asset -a file the my app uses- as I bypassed using the asset.
(Running my app via visual studio in both the emulator and my phone worked perfectly.)
I then decided to re-house my forms and classes in a new template as I suspected it was corruption in some xml configuration setting that didn’t bother Visual Studio. This worked great and the app now runs stand alone on the phone (and emulator).
I have written a simple login page using xamarin forms. When I try to deploy it on emulator, the emulator opens but my app is not visible.
1) Does it take time for the app to be deployed? Or would it appear on start up?
2) Should warnings be considered? I have no errors though.
Most Android emulated devices are slow. I have found that some of them simply won't render an app. This is not an indication that the physical device, which you are trying to emulate, won't work however. Try testing what works in an emulator and then creating a copy of what works in the device manager. Then make slight changes that are closer to the target device in the copy. Deploy every time to ensure that it is working. This process takes patience. If you are fortunate enough to have the physical device, debug through the USB connection.
I have created an app with android studio. it has some text files which will copy on device. app running normal on real device but on emulator it was fail with message i/o error.
all other function are running normal on both.
I've found a solution. The emulator has Android – Marshmallow.
Select the app icon and move to app info.
Select permissions.
On storage allow it by moving the button to the right side.
Now it's running OK.
I do testing on app that I download from Jenkins as a .apk file. I have Android Studio and I have gotten as far as connecting my Samsung galaxy S6, setting it to debugging mode and I can see a bunch of device logs coming up at the bottom of my Android Studio screen.
What I cannot figure out is how to see the logs for the app I am testing. I have tried to filter the logs by using the app name. Do I need to filter the logs using a specific file name? Maybe the file used to install the app? Is there an easy way to get the app logs from my device that I am not seeing?
You need to ensure that:
This is the debug version of the app.
Proguard isn't set up to strip out certain logs.
ADB Integration is enabled.
Sometimes, you have cycle through the USB options (For example, my LG phone needed to be in PTP mode before Android Studio picked it up)
For obvious security reasons, most apps don't want the public to access their logs.
I am developing an android app that will run under the android.uid.system user (the tablet manufacturer is signing the app for me so it will be able to run under this user id).
The problem I have is that it takes about 2 to 3 weeks each time I want the app signing. As I make code changes I want to be able to test them under the system user but it is not feasible for me to wait this long to be able to test/debug my changes - especially if they turn out to be wrong.
Is there any way I can test the app on the tablet as the system user (or mimicking system user privileges) without having to get it signed every time?
Further info:
I am developing on windows 7, using Eclipse IDE.
The tablets are running Android 4.4.2 and 4.4.4 (2 different models).
The tablets are not and will not be rooted.
Assume a fairly basic level of understanding of app signing on my part.
Thanks in advance
Root the device and install app to system/app folder
I have sorted this myself by rooting the device for development purposes and then copying the app from the data/app folder to system/app and then removing the it from data/app folder.
The device then treats it as a system app and so far all of the system level functions I have tried have been working (such as reboot device and set timezone).
This article helped (although I had to copy (cp) and remove (rm) rather than move (mv) the app).