I have created one android application.
i have to run the app which means it is worked well on android emulator and device.
Afterthat i have to change some layout height and weight(some design changes).Now i have to run these updated apk file which means the old layout design only work on android emulator...why the old apk design is working on android emulator...i wish to work the new apk file on android emulator...
how can i resolve these error ??? please help me ...
i have done a simple thing that solve my problem whenever i get this kind of chaos !
1. Open Your emulator
2. Goto Setting>manage app or apps(ver 4.1)>your app
3. now uninstall your app from the emulator.
4. clean your project and then make your changes
5. run the fresh app again
6. BOOOM your app is now running
if you still got problems then discuss it in comments :)
Do the following:-
Make sure there is no error in any of the XML in the project.
Clean & Build your project again.
Run the application on your emulator(new apk will be now generated in the bin folder).
If the above don't work, try to clear the user data when starting a new emulator instance, try running your updated application then.
Related
I have an app that is build using React and is wrapped in capacitor. I was having no issues running the app in debug mode on android studio a month ago, or creating release files, but now I am.
I have checked the app-debug.apk (static/js/main.chunk......) file that is created when I select run, and it contains the updated code, I have sent the package to a colleague who ran the .apk on their machine and saw the updated code, but on my emulator and on my android devices, I am seeing an old version of the code.
I have removed all debug-release.apk files on my Mac and followed steps online such as clean build/rebuild, updates off mac, android studio etc but still no luck.
I am at a complete loss now.
Any ideas?
Thanks
Update: After much troubleshooting, we deleted the build folder android>app>build and the rebuilt the app, and ran it, and it fixed the issue.
I was always able to build from this project, this just started happening this morning. When I run ionic build android everything runs smoothly and the build succeeds, but the date modified on the android-debug.apk file stays the same, and I don't see my changes when I run it on a device.
Could it have something to do with messed up permissions and somehow it doesn't have permission to write the apk? I'm running Ubuntu-server 14.04.4.
I know it's been answered before but I'm adding this to let you guys know what I've tried and how it's not working anyways...
I've also faced same issue and tried several things like
Renaming APK file, expecting it will create new one.
Deleting build folder, expecting as usual will create new one.
opening project in Android studio, expecting it will create new one when I use it to launch the APK to device.
I've tried calling ionic prepare platform before calling ionic build.
The ionic build is a proxy for cordova build command.
But in this issue all of above approaches were failed.
The reason I can see behind this is because of no proper response/function of added platform to your project, as when you build it's cordova platform android's responsibility to prepare build on your command. Which is not working.
Lot of people suggests that You need to us ionic/cordova restore, this will restore your state.
Another way is you can use Android Studio's build APK option which helps you not to disturb your plugins by restore or reset commands.
Hope this helps you save your time from trying all these approaches.
Could it that you are looking at a wrong place?
When build command is successfully finished you should see smth like below in console
Built the following apk(s):
<PATH_TO_YOUR_SOURCES>/platforms/android/build/outputs/apk/android-debug.apk
Are you checking this this location?
Okay so the problem isn't with Ionic, it's just that the changed files aren't showing up in the ftp for some reason. So now I will try and figure that out.
As suggested by #mobileevangelist , ionic cordova restore can be done using command
ionic cordova prepare
It fixed my problem.
Try to
Open Android Studio
Choose Import project
Select YourProjectDirectory/platforms/android folder
Choose Build -> Build APK
I recently switched from Eclipse to Android Studio because I read that it is now the official IDE for Android application development. I downloaded and installed the latest version (1.0.2) for Windows. When using the program for the first time, I decided to create a test application to see if the program was working correctly. Unfortunately, it was not. Once I clicked the finish button to complete the New Project Wizard, A loading bar showed up that said Gradle: Build. This is where the program gets stuck. There is no error message and it appears that the program is running fine, however the build never actually completes. I am never given my MainActivity.Java class, or my activitymain.xml document. If I click the cancel button, the program freezes and I have to use the TaskManager to kill the program. If I re-enter the program and choose to open an existing project, my project will be there. However, upon trying to open the project, I am greeted with the same Gradle: Build loading bar.. I have been searching for an answer for the last 3 days and nothing has worked. Any help is greatly appreciated!
Things I have tried:
Simply letting the program sit for a while to see if it was actually downloading something and was just really slow. I let it sit for 45+ minutes before killing the program.
Uninstalling and re-installing Android Studio
Restarting my computer
Turning off my firewall (Kaspersky)
Running the program as an administrator
Connecting to a different network
Disconnecting my computer from any networks (to force the program to build in offline mode)
Manually downloading Gradle from the link that Android Studio attempts to use when it gets stuck and telling the program to use that file instead of downloading another one.
(I went to this link https://services.gradle.org/distributions/gradle-2.2.1-all.zip, downloaded the file, unzipped it, went to Gradle settings in Android Studio, checked the Offline work checkbox, and finally set the service directory path to my unzipped Gradle folder.)
Hopefully I have given enough information and made it clear what my problem is. If not please tell me what else I need to explain so I can get this issue resolved. Thanks!
Please note I am working on a 64 bit machine running Windows 8. Also, I use studio64.exe
to run the program.
From the discussion we had in the comments, it does not look like you have your gradle on your windows path.
Please change the below to point to your gradle install:
set GRADLE_HOME=C:\<installation location>\gradle-1.11
set PATH=%PATH%;%GRADLE_HOME%\bin
After this, verify that in the terminal running the following works:
gradle tasks
once you get this working, you will want to run the following in your project:
gradle wrapper
This will produce a .bat file which you can then use to run gradle through the wrapper, letting you support multiple native gradle installations.
I created four or five little test Android apps in Dreamweaver CS6 using PhoneGap Build. Each time, the current app would run in the emulator. Now, instead of running the project in the current site, the emulator64-arm keeps running a previous project when I click the PhoneGap Build icon on the Android emulator home screen. I have tried deleting all my projects from build.phonegap.com, and deleting all but the most recent project from the local drive. Even so, the emulator runs the old project -- which as far as I know, doesn't even exist anymore, either locally or on build.phonegap.com! Do I need to delete the project from the emulator? If so, how would I do that? Any help will be greatly appreciated, cause I'm stumped!
Mac OS X 10.6.8
Mystery solved. The first few times I installed apps on the emulator, I clicked the PhoneGap Build icon to run them. But later appps installed under different names -- I guess based on info I entered into the config.xml file.
Still would be nice to know how to delete those apps from the emulator. But at least the really mysterious part is explained -- why it ran a different app from the one I just built. I was just clicking on the wrong icon.
Im new to android.
I have been writing my first app, I testing it about 2 weeks now.
Everything is went good, when today my apk doesnt want to be installed on my Phone.
So the followings happen:
I use eclipse.
I export the app with the right way:
Android Tools -> Export Signed Application -> bablabla I got a key and everything so..
The Emulator runs it perfectly, but when I try to install it on my phone, its icon not showing as an android application, its like 3 blank pages, so it shows as an "unknow" file format, and when i try to install, error message appears: "No applications can perform this action"
It seems like Eclipse didnt build my project as an .apk file.
Can somebody helps me?
What changed? Before this I could ran my apks on my Phone.
(Samsung Galaxy S, but I dont think its really matter, I guess it will be an Eclipse thingee)
Check out this documentation: debbuging android app on device
It looks rather like problem with manifest file, but I think You can run Your app by description from the link.