Do I need to prevent caching on Android emulator? - android

I am using PhoneGap to develop cross-device (simple) applications, and I am currently using eclipse with the Android Emulator. The problem I am encountering is that it does not appear like my code changes recently are reflected by the application installed on the emulator. I have tried uninstalling the application from the emulator, cleaning and re-building from within eclipse, but neither of those has worked.
Is there some manual script I need to run to re-install the .apk? I am a newbie at mobile development, so please bear with me. :)

Eclipse should automatically rebuild your application if the option is activated. Take a look for it at Project -> Build automatically
The ADT should reinstall an application if you run the project. Take a look at the console (not LogCat) of eclipse, you should see some information about reinstalling the application (at least thats when you deploy on a device).
If you want to try if a change was successfully made, try to use a log statement that you change as soon as you have the feeling that its not the current version. So you can find out if at least the deploy worked.
If nothing of that helped, we should dig deeper...

I had the same problem (my app did not get updated whatever acrobatics I was doing) until I simply refreshed the Project in Eclipse. The javascript files I am using in the project were edited in an external text editor, the HTML in Dreamweaver, so Eclipse apparently never pulled the renewed files from the file system, even after restart. Doing a refresh took care of that.

Related

How do I get rid of (1) after android studio project files?

So I have been working on an app for a project in the android studio for school. Since I am working on it both at home and at school, I uploaded my project to google drive to access it at school. However, when I downloaded the project, unzipped it, and opened it in Android Studio, nothing is showing up and I can't build, clean, or run anything for it. I attached pictures. I suspect this may be due to the fact that since I already uploaded a version of my project to drive before, it added (1) to the end of almost every file in the project. I'm not sure whether this is causing the problems in the android studio. How do I remove them, any suggestions?
ok looks like there is actually no way to do this, oof

My Android Studio is completely broken

I recently started learning android development and I am using Android Studio. For the first couple of days it worked fine but now nothing is working. I can't even get passed the welcome screen. I have tried to delete everything and reinstall it multiple times but it hasn't worked. When I try to start a new Android Studio project it says "Your Android SDK is missing , out of date, or is missing templates." I would like to just completely delete everything and reinstall it. But i'm not sure how to properly do that. Also im using a mac.
To completely remove you can open Finder, goto the Applications folder and locate Android Studio then drag that to the Trash, once done you need to empty Trash.
Then you can download and re-install Android Studio.
Also you may need to take a look at this question as well
Hope that helps.

Android studio - no launch to last version of app and no project structure

In android studio, I had a project that was working in first place but then I created multiple copy of it in other paths to add changes to these copies instead of the original.
Afterwards, I noticed that the emulator shows up but doesn't launch the app I am trying to run. I followed a tutorial on YouTube that opens the setting app on the emulator and clears launcher data. then nothing changed.. I noticed that no matter how many changes I am adding to the file, nothing changes in the old app icon existing on the emulator.
Things got much worse later when I noticed that there is no modules or any other folders in the project structure except the SDK and when the older project versions were found to have same problem suddenly.
Even when I create a new project that is empty, same thing happens and the app crashes once it's installed.
Android app icon button before run appears in the project with a red cross over it.
Both the emulator and the mobile device don't get the latest version of the app I am trying to install.
I tried to make project, build, run, clean project, sync with gradle file, invalidate cache & restart. However, none of these solutions seem to work.
No idea what is going on.. things seem to be messed up and all online sources seem to be less useless to me.
Note: I am using Android studio V 1.1.0
so, I found that the best solution to this problem is to uninstall the current version of Android studio and SDK folder and reinstall it from scratch.. hope that helps

Android Studio debugging inconsistency

I'm not sure this is a common issue, I have Android studio installed on my window pc and my mac laptop and on and off I will switch between both.
Just now I was cleaning up my source code and delete a .xml file from the layout folder and I debug using my phone to make sure it is a working before I upload to the server for other programmers to access it.
Later on the programmers said that there are errors in my file and ask me to look into it, so I immediately switch to my mac and try to debug it and I got the error as well. Later found out that I didn't remove the activity call from AndroidManifest.xml for the previous deleted .xml.
To make sure I did not get the wrong version of my build I try again on my window pc with the errors and perform debugging and surprisingly there isn't any error and the emulator run smoothly. How is that possible?
do you use version control aka team, git, subversion vcs. I believe android studio does this automaticaly via vcs on main menu. githubis another form of this concept. When a team works together it is common to have a local copy of source code and a remote repository on a server. You also may have different branches or versions of the local and/or remote source code. If you find out what version control you use and you still need help post a comment back.
By the way android studio is now using gradle so you can now have free and paid flavors of the same app and i can see that could cause problems.

Huh? Android Preferences page refuses to load after adding SDK 1.6

This one is really weird. I had a perfectly working Eclipse + Android 2.2 SDK working in both Administrator account and LUA (Limited User Account) under Windows XP.
Then I decided to add the Android 1.6 SDK (I could do it from an Administrator account only). It seemed to have gone well, since it still works perfectly -- but only in that Administrator account!
When I try to start Eclipse under a LUA, I receive the following error message box:
Which disappears within 2-3 seconds and replaced with:
I then tried to check the Preferences page, but again, all I receive is error messages:
and:
Any idea why this is happening and how to fix this?
(I would love to be able to continue working from a LUA)
Update: I have uploaded the error log file (referred to in the "Show Error Log" in the message boxes), for your expert examination. Hopefully this can shed some light on the mystery.
The full answer is somewhat complex, concerning Eclipse's configuration area, the workspace area, etc. This is all documented on the Eclipse site, if you're interested.
But there's a simpler, more immediate approach, since you're not trying to run multiple users simultaneously on the same copy, over a network -- in which case you'd need the full answer.
Simply install Eclipse in a directory, say, C:/dev/Eclipse. Make sure both your limited user and your admin have write access to everything. Run Eclipse as the limited user. It should start right up, as there's nothing privileged that is needed by Eclipse.
At this point, you can lock it down as read-only if you desire. By default, all the configuration is stored within the Eclipse installation directory.
I'd suggest starting with a fresh install at this point, to eliminate any inconsistencies that you may have introduced. Though you should be able to reset things by deleting all the subdirectories of the configure/ directory (but not the config.ini). There's an official way to do that, but that's part of the full answer. :=)
I'd also suggest using a different workspace for each user, to avoid any permissions problems.
But my BIG suggestion is -- upgrade to Windows 7, and do NOT run Eclipse as an administrator!
Anyway, once you have it working -- to upgrade in the future, make the Eclipse directory completely writable by the limited user, and then update as the limited user, and then make it read-only again if needed.
Note: This is the cheating way. The REAL answer is to give each user their own configuration directory. This is only viable because you have control over both users and can coordinate any updates.
Try running eclipse by downloading the binary and unzipping and directly running the .exe rather than "installing" it. The android tools should work this way if you configure the appropriate paths to them, and if eclipse isn't "installed" but simply run from a the archive folder, it should try to download plugins and such into its own directory (owned by your user), which may solve your problem.
I doubt the Android developers who built the tools run under LUAs, so they probably didn't run into this problem...
Workaround found: Run Eclipse as Administrator (Right-click exe/shortcut, then select "Run as...", then enter Administrator's password).
This is a workaround, not a solution, but it does allow me to continue working while logged in LUA.
Thanks to #David who suggested this solution here: Android ADT Plugin doesn't show up in Eclipse
Update: Solution found:
Enable the Security tab in Windows XP Pro (""Use Simple File Sharing.")
Add the LUA account to C:\eclipse with Modify permissions.
That's it. No need to run Eclipse via "Run as". Also eliminates the need for a fresh install (which takes more time).

Categories

Resources