Recently my Eclipse started to ignore java files changes and doesn't rebuild project automatically.
I change file, save it, then trying to launch it on device and see in logs that "application is already installed. This is means that apps on device and on desktop are identical.
If I uninstall app from the device and install again I see old applicaton, with old code. Debugging it is not possible since code is not synced.
Project will rebuild ok after cleanup or after resources changes but it's real pain to rebuild whole project after every code change.
It is just last few days. Why is it? Bad recent Eclipse autoupdate? How to fix it?
My Eclipse seems to be latest version available, IDE 4.3.2, no updates available, latest ADT.
Here is my build settings
Try looking at Window -> Preferences -> Android -> Build
Then look to see if 'Skip packaging and dexing until export or launch' is checked. If so then uncheck it.
Related
I had a USB connection problem when I debug and updated BIOS then, the laptop had problem with drive so, I needed to recover it. So, I recovered it with removing all the applications and just kept my personal files.
And I downloaded and installed Android Studio again, and SDK missing problem occurred like below:
I can't see 'SDK' when I install Android Studio from here. So, I can't select any.
I tried with SDK Manager. I can't install any versions with "Your Android SDK is missing, out of date, or corupted." error.
I tried Update. But nothing changed. (Updated to 3.3.1, but failed to Sync SDKs ERROR.)
Some people on Stack-overflow suggested to download SDK separately, but their links just show Android Studio installer, which I already installed. Maybe the links were so old.
"C:\Users\XXX\AppData\Local\Android\Sdk" does not exists.
I uninstalled Android Studio include User setting and reinstalled it.(There is no such thing that I can select previous version kind of thing.) But the result is the same.
TL;DR This is sometimes caused by Windows registry settings retained with the current AndroidStudio project. To fix, just startup Android Studio and then close the current project (File -> Close Project). If this was the problem, AS will now go into a long update and restart cycle to repair itself, but will end with success.
I also recommend that you then change AS settings to not open the last project on Startup (Settings -> System Settings -> Reopen projects on startup)
Windows 10, Android Studio v3.6 and v4.0.
This one drove me nuts! I had the same problem - my SDK seemed to be corrupt so I did a full Uninstall (v3.6) and Install (4.0) of Android Studio and when Android Studio started up I got the same message Android SDK is missing.
The SDK Manager in Tools wasn't working.
I went to the link and there was nothing to download the SDK. So I installed the file which looked a bit like the SDK, commandlinetools-win-6514223_latest.zip, unzipped, and then tried to use the missing SDK dialog to include it in AS, and no joy.
BUT - I noticed that after an uninstall and fresh install Android Studio still came up with the last project I was working on so I guessed it must be something in the windows registry (rather than AS settings). I closed that project and AS suddenly popped up a dialog to install the SDK!
After a big download and install, Android Studio returned with the SDK (and SDK manager) all functioning!
So - just startup Android Studio and then close the current project (File -> Close Project)!
How I did a complete re-install.
Uncheck the "Keep Settings" (or similar) option in the Uninstall dialog, but export your settings first (File -> Export Settings). I found it easy to: Export settings; Complete Uninstall; Download and Install; Import Settings;. But, or course, there were several massive downloads. Still don't know why the last open file came up after the fresh install. It's probably in the registry, so, if there are still problems then you'll have to clear AS from the registry as well. Which sounds painful.
If android sdk is deleted, go to :
SDK manager -> edit -> next ..
I solved this problem with connecting android-sdk folder in C drive.
I reinstalled my OS. But hopefully, I kept my personal folders. So, I could find that folder.
However, If you don't have SDK folder, you may need to install SDK by yourself.
I just updated from android studio 0.9 to 1.0 and now when i try to run my app everything goes well up to the point where it asks "choose device", then i select my note 4 and then issues error "Local path doesn't exist."
I am using 64bit windows
Also clicked on "Sync Project with Gradle files". The problem is still there!
App:
Waiting for device.
Target device: samsung-sm_...
Uploading file
local path: C:\MyApp\app\build\intermediates\classes\debug\app.apk
remote path: /data/local/tmp/com.example.MyApp
Local path doesn't exist.
Error Log:
11:32:40 AM Gradle build finished in 5 sec
11:32:43 AM Unexpected Error
Local path doesn't exist.
Local path doesn't exist.
The project may need to be synced with Gradle files.
Sync Project with Gradle files
Looks like an issue with APK_PATH, which for some reason can't be found..
You may try following the solutions from here or here.
Also, you may try updating your Gradle plugin to the latest version and rebuilding the project.
Did you import the file from an Unix system? The path slashes are different in each one. Try correcting the paths to match your current system.
I had got the same error.
And I cleaned and rebuild the project and
Project -> Clean Project/ Build Project
Synced the project using Gradle
Click on "Sync Project with Gradle files" in Event Log
And you should be good. Worked for me.
Check the Run/Debug Configurations you have.
Click on the icon that has the Android robot written app then click on Android Configuration. When you click on "app", you will see to the right, at the bottom there is "Before launch..." Make sure in the input box below that it says "Gradle-aware Make". If it doesn't, click on whatever it says and click the pencil icon just above it (it is for editing). In the dialog box that pops up, remove whatever command is there (sometimes it is to unistallAll before reinstalling the new updated apk) and click "Okay". When you come back, you will see the input box now has "Gradle-aware Make" which means when you build your app, it will just install it on top of what is there.
I had this issue because I was unistalling everything before installing the new apk but I once cut the process in the middle of this process after it unistalled but not reinstalled. This meant the next time I ran the app, it wanted to unistall but could not find the apk as it has been deleted before. Changed back the configuration like above and it worked.
I have a problem with Android Studio. Since this morning I can't edit my layouts through the Design interface. It's stuck on "Initializing Rendering Library" and the IDE freezes. All my layouts were working well yesterday and I haven't changed anything since then.
I have tried to invalidate the cache and restart but without any result.
Try that steps :
1.Update Android SDK and Android Developer Tools.
2.If that will not help, reinstall Android Studio using the newest available version (remember to do a backup of your data and projects).
3.If that will not help, install other IDE for example Eclipse and import all your projects to it.
Good luck !
For me helped such steps:
Remove .gradle folder from the project folder, all *.iml files and
.idea
Remove C:\Users\username.AndroidStudioPreview1.2
Run Android Studio without importing settings. This will allow to see a dialog where you can open your project from scratch. If you
import settings then Android Studio will open previously opened
*.xml files which caused the problem (hanging "Initializing Rendering Library") and the situation will happen again
Run Gradle cleanup
Sync project
Invalidate cache and Restart
Build the project from command line. If use Build from AndroidStudio I got hanging "scanning files to index..."
I reinstalled my android studio without success,
Then, I downloaded the sdk again, and change my old sdk-path to the new one
After I restarted my studio, it works.
The most mysterious thing is, I rechange my sdk-path back to my older one, then every thing is ok,I don't know why,but it solved the problem
I followed googles instructions and exported a test project from Eclipse by using the
Export -> Generate Gradle build files
opened up Android Studio and imported. After getting my support libraries working properly my project would compile with out any errors. My problem started when I tried to run the app on my device. When ever I try to run the app it directs me to use an AVD, never giving me the option to select my device. I obliged, created a new AVD but to no avail only to get build failed error. (I'll add the exact error when I can) NOTE: I can see my device is connected by clicking on "(6)Android" and the bottom left of the screen. I do see all logcat messages in verbose. I added android:debuggable="true"to my manifest but still nothing.
Confused I created a new project directly from Android Studio, hit run and bingo,...it gave me the option to use my device to run it or an AVD. Selecting either results in a successful launch of the dummy "Hello World" app. I think it may have something to do with build variants as my imported project doesn't specify "debug" vs "release" while the Android Studio generated project does.
Anyone else experiencing this?
I found the answer to my own question. Bit of a double whammy. Before installing Android Studio I updated my SDK via Eclipse (as recommended/required by google). Turns out by doing so a few items in my current projects got disconnected. ie. build paths, dependencies, ect. (you now have to place external Jar's in the src/libs folder)
Here is what I did to fix it.
In Eclipse, Preferences -> Java Built Path ->"Order and Export" tab. Make sure items are selected
If you have external Jars, manually copy and paste the jar in the libs folder of the project. (I did this in my Finder)
confirm the project launches via Eclipse
If it runs, export the project again by "Generate Gradle build files" (confirm overwriting existing files, if any)
5.Open Android Studio and re-import the project. Again, confirming overwriting of any existing files.
6.Next to the run bottom at the top of the screen click on the drop down next to your project name. Click "Edit Configurations..." and select "show chooser dialog" if not already selected.
clicked ok to exit,..and PRESTO!!! I finally have a successful project migration.
Hope this saves someone else time.
Cheers!
Yeah i have experienced similar stuff on Eclipse, its quite buggy. Since Android studio is based on it i would expect everything. Still the best solution to everything is to reload project, refresh project or restart IDE.
I've got a dual-core 1.6Mhz CPU with 2G RAM, thus, I'm trying to use the emulator external to Eclipse and install/un-install the .apk using adb. When I try to build the project (after some code changes) without running it, Eclipse seems to-do nothing ?? any idea how to make Eclipse re-build the .apk without the need to Run it
Thank you
On a Mac menubar:
Eclipse -> Preferences
On Windows menubar:
Windows -> Preferences
From this Preferences window:
Android -> Build
Now uncheck "Skip packaging and dexing until export or launch. (Speeds up automatic builds on file save.)"
You may have to restart Eclipse for the preference change to actually be reflected.
By default, Eclipse auto-builds the .apk as you make changes. You can find this at any time in the your project's bin/ directory.
If there are no new changes (and you haven't performed a clean on the project) then requesting a build will do nothing as Eclipse has nothing to do; it already compiled the project for you.
Right click on your project in Eclipse. Choose "Android Tools". Choose "Export Unsigned Application Package".
I'm not much more experience than you are with Android, but from what I understand, the .apk is built incrementally as you modify the sources. So you don't have to do anything. Just save your code and use the .apk.