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.
Related
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.
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 two phones connected to my computer, via USB. I run my Android app from Android Studio on one of the phones. Then I want to run the same app, same version, on the other phone. But it doesn't start on the other phone, I don't get the popup to select a device. AS sais "gradle build finished", then nothing happens. I'd expect to see the device selection popup.
I received the answer here:
https://code.google.com/p/android/issues/detail?id=207055
I decided to switch off instant run so Android Studio has the behavior I know, and I like.
my problem : the app I have uploaded into my cellular device is shown without the pictures I have insert to it .
steps I have done in order to install:
I have inserted the xxx.apk file into the device via usb
I downloaded an apps installer via the Market
I opened the app using the installer and instead of picture an white background appeared
when I opened the xxx.apk file using file system I found the pictures.
note: even an application icon weren't appearing.
Apparently the res libary having problem to be bined to application.
I might ness to add something to my appliction manifest?
I might need to change something on my device ? (I already made a change and enabled user's not Market application )
I would be very grateful for some life saving answer I need to show my work in a few days in this is the first time i tested her on a real devise.
I also tried an example as shown in hello android book the same example worked perfectly on the emulator where on my android device (Motorola milestone ) the picture and icon weren't shown
Please tell me what I might be doing wrong guys I need to apply my project back at uni(I was the only one in uni who did it on android and in my country most of pep don't even know what android is so getting help outside of forum's like this is not an option ) so please please help me .
I don't know what app installer you downloaded from the Market, but you shouldn't need it. You should be installing the app to your phone using the same SDK tools you used to install it to the emulator. Ie, using Eclipse or the commandline "adb install" commmand.
I'm assuming you used the SDK tools to install the app to the emulators? In which case, start there. Start with looking at what you're doing different between when you installed unsuccessfully to your phone and when you installed to successfully to the SDK.
In my experiences so far, there should be very few differences between working with the emulator and working with the phone.
Well, something is wrong, but what is hard to tell from your question. What pictures are you talking about? Your drawable resources? My guess would be that your application works in the emulator (you have tested it?), but that it doesn't on the phone you're testing with. Have you checked the logcat output?
If you're developing from Eclipse, why not try a debugging session using the phone rather than the emulator?
Hard to narrow down without more details, but a few notes:
Pontus has a point - what's your logcat output? You can use logcat on a real device. Maybe not yours unless it's rooted, but with many phones you can.
Do you link the drawable to your app in the manifest file?
How do you test on emulator vs. device? Do you right-click the app and choose "Run As -> Android Application"? Do you do that for both emulator and device?
When you run on the device, do you first sign it? If so, can you verify the jar/apk and see the contents? Is the drawable under res/drawable?