I just got a new Xamarin.Forms portable project in Visual Studio, and I'm trying to run it on the VM.
When I run it, this error appears:
Error encountered while loading the project...
How do I fix it? Every project I start has this error.
I think of 2 possibilities here where I've faced such problem
Broken/ incomplete downloaded zips
This may have occurred because you cancelled or closed the VS out of frustration because it was taking too much time.
while in fact the visual studio is downloading the zips at AppData/Local/Xamarin/zips. because you closed visual studio, the zip files are not completely downloaded.
what you do is go to AppData/Local/Xamarin/zips delete all the zip files then AppData/Local/Xamarin you should only see Universal, zips and logs folders delete the rest. wait for the zips to install completely. this is gonna take time for sure.
Problem with the References
Check if any of the references are showing any warning sign or something. if so remove the reference and reinstall it.
This fixed it for me:
Close your project
Locate the project's *.suo file and delete it (it may be a hidden file, don't remember)
Reload your project
Related
Ok, so recently I've been trying to run my application on Android Studio (1.1.0), but every time I try to run it, the following error pops up:
Waiting for device
Target device: samsung-blah-blahblah
Uploading file local path: C:\Users\jimmykim9001\AndroidStudioProjects\blahblah\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/blah.com.blah
Local path doesn't exist.
Now by doing some research I've come to this link: https://www.youtube.com/watch?v=i4WcMIyc8OQ This would have been helpful if I was able to find my apk files when searching my project; however, they're not there, which is strange because I'm pretty sure they're supposed to be created automatically. So I tried to rebuild the project, but that fails half-way through (Failed to complete Gradle execution. Cause: ). What I need to do is get Android Studio to generate the app-debug.apk file, but I have no idea how. All the links I've found involve moving the file into the right place, but the file itself doesn't exist for me. Any ideas?
Note: I imported a jar file recently and ever since I did that, the problems started. Not sure if this matters or not.
I got your question. I have also faced the same problem some time ago. Let me clue you in , here is some approach i would like to try :-
Your apk must be here ( if it have been automatically generated)
your_app_name\app\build\outputs\apk
If app-debug.apk is not there then , Clear the cache File -> Invalidate Cache, then restart your IDE . Then rebuild it.
Try removing the jar you have recently added and rebuild the project.
you can try re-importing your project.
From above all what worked for me 1st point . Try these .................................best of luck.
Here are some links you might like to see....
Build unsigned APK file with Android Studio
Apk location in New Android Studio
I get the following error sometimes during compling and running the application using eclipse.
Failed to install ABC.apk on device '4df11bd574734fd9': Local path
doesn't exist. [2013-08-20 09:28:04 - ABC]
com.android.ddmlib.SyncException: Local path doesn't exist.
[2013-08-20 09:28:04 - ABC] Launch canceled!
The pop up in eclipse says that, the application contains some errors, which I need to fix.
I have updated my eclipse and other related things to latest.
I followed all the posts whihc talks about resolving this error, but none of them work for me. I see that once I get this error, my bin folder is kind of locked and I cannot delete it. Currently, the only option left for me is to restart my laptop and then it starts to work again but it is very tedious and time taking.
Can someone suggest me what should I do?
Well finally I make it. there was a program/process that has blockep miapp.apk file, so when I tryed to clean my App it doesn't drop this file. I stop the program/process and delete manually apk file. now its running great.
okay i found the solution
just transfer all your project directories except bin directory into another folder location of same name as your project name.Now import your project from new location.your project will run this time
Also suffered from this issue. The culprit turned out to be Google Drive, which for some reason locked the .apk file after I shared it to my Drive and then caused all kinds of headaches.
Closing the Google Drive tab fixed the issue.
I updated tools in my Eclipse first by going to Help->Check For Updates and installing everything i that it suggested. Then by going to Window->Android SDK Manager and updating multiple things including my SDK version.
After I have finished my update all my Android projects got a nice red box with an x inside it. I explored the projects and noticed that none of them had any errors inside the project just the project itself had the error icon. I searched online and i found that other people had similar problems. So i thought i found the solution. Alas after cleaning and building the project I got additional error icons next to multiple java files in my projects. Eclipse cannot locate the automatically generated R files when it tries to import them and all the imports are selected red.
I tried deleting the whole content of .android directory (starting with specific few files then the whole content) but that did not bring desired results.
So i have deleted the newly generated files and restored all the old ones.
When I clean and build the projects again all the errors disappear but only until I try to run the project again and then same error appears:
Your project contains error(s), please fix it before running it.
I have also found a related question. It claims that there must be a problem with my xml files. I did not modify any of my xml files since updating the tools so I dont know what could cause them to have errors.
Any ideas as to what is going on??
I've found that eclipse is now picking up errors that it didn't pick up before, because they updated lint, you may have to check all your files and see if there is an error because of this, if it doesn't work try removing Android from the build and reattach it, clean the project, build project, make sure the activities are using the right R files and check what lint says, its like a little square with a tick in it I think.
I had exactly the same problem, solved by removing any imports of R in my code and then cleaning the project
Strangest thing just happened. Even though I have done this 2 times before I have again deleted all my files in .android folder exited my Eclipse and opened it back up again. All the errors were gone and most of my projects work correctly. I have spend a lot of time on this problem and i dont know how it got resolved but Im glad its working again.
Every time I open Eclipse, I get the following error messages:
Android SDK Content Loader:
parseSdkContent failed java.lang.NullPointerException
Initializing Java Tooling
An internal error occured during: "Initializing Java Tooling". java.lang.NullPointerException
Loading data for Android 2.2
Parsing Data for android-8 failed java.lang.NullPointerException
Loading data for Android 2.3.3
Parsing Data for android-10 failed java.lang.NullPointerException
Loading data for Google APIs (Google Inc.)
Parsing Data for Google Inc.: Google APIs:8 failed java.lang.NullPointerException
See link for screenshot:
http://i.stack.imgur.com/lhhQQ.png
(I am using OS X Lion, and Eclipse Helios)
First i read some posts saying that it was the AVD.ini file in the .android profile that was causing the trouble. I tried deleting all the entire .android profile folder as suggested in Android SDK Content Loader failing with NullPointerException. This didn't correct my problem.
I tried deleting the entire Android SDK folder, downloaded it again and installed a couple of Android versions through it. Still the same error messages...
To ensure that I didn't have any old plugins or something that were the issue, I uninstalled eclipse, downloaded it again and installed the Android plugin again. (So the plugin is up to date).
When I go into one of my Android projects, I get error messages on places where I acces resources by using the R file. Regular Java projects work fine, but all Android projects gets small red boxes with white crosses on them. I have been searching for a solution to this problem since yesterday, but at this point I'm completely qlueless and would appreciate any help I can get!
Close all open projects and exit Eclipse. Now you can open Eclipse without getting the error. Start opening your projects one by one to find which one causes the problem. This is most likely because you deleted a Device profile inside the AVD manager.
Do not delete all the full .metadata
Backup .metadata
delete only .metadata/.plugins/org.eclipse.core.resources/.project
restart eclipse
Observation : the projects folders are created
Further - if you are using svn/git/hg have code repository links it would be destroyed, so to reinstate
close eclipse
copy relevant projects from backup to merge with current projects in .metadata/.plugins/org.eclipse.core.resources/.project
restart eclipse
Downfall - sporadic fail error may occur (sync or something) - harmless
backagain
I encountered exactly the same issue this morning. This is a workspace related issue.
Solution 1
I looked into my .metadata and read .bak_number.log files . Some layouts failed to parse and my projects were out of sync with the file system.
So I deleted all the .bak_number.log files. Relaunch Eclipse and the whole worskspace should work again the way you left previously.
Solution 2
However if it's not due to out of sync with the file system. Change the workspace then import all the eclipse projects from the previous workspace.
Thanks the project.properties files , the dependencies are still kept.
PS : I should return to IntelliJ :)
first close your Eclipse
Go to your workspace and rename .metadata to tushmetadata and go to
tushmetadata- >.plugins -> org.eclipse.core.runtime -> .settings
and copy all files from it.
now open the Eclipse and go to your workspace there you can see the
newly generated .metadata folder in that go to .plugins ->
org.eclipse.core.runtime -> .settings and paste here and do not
overwrite any file.
Try to "Hello World" project and run it.
Try to delete file .metadata from your android workspace folder. .Metadata folder contains all configuration files for eclipse. It works for me.
Your answers might be right. What I did was to change my workspace. I redownloaded the project I was going to work on from git, and reimported it. Now it works fine :) Maybe there was some files in this project that made the error messages apear? Dunno....
I have remove the .metadata folder but after it, when I run the eclipse, I cannot creates any Android project. To solve it, I have done the follow:
Go to the main work directory of eclipse
Localize the folder com.android.ide.eclipse.adt It should be in .oldMetadata/.plugins/
Copy it to the new eclipse configuration: .metadata/plugins/
See the full solution here:
http://www.jiahaoliuliu.com/2011/06/running-android-sdk-in-eclipse-errors.html#solution4
For me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. It's not an Android project, but for some reason the newer versions of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties file from an Android project to the host unit test project.
When I met this problem about a year ago, I had some projects in my workspace that needed a specific Android SDK level (let's say 2.1) and i didn't have it installed in the Android SDK.
slott's answer helped a lot. Deleting the .metadata or reinstalling eclipse didn't though. The trick was to isolate the project causing the problem, delete its .settings folder and .project file and reimport it.
I discovered another cause, where I'd added a space character into an otherwise blank line in the project.properties file. When I eventually ran android update project -p .
the program (android.exe) threw a NPE exception. When I deleted the space from the blank line the android update project command worked and eclipse started behaving (after running clean a few times).
This happened with r20 of the Android SDK on a Windows 7 64-bit machine.
FYI my change that fixed the problem in project.properties is public at http://code.google.com/p/android-daisy-epub-reader/source/detail?r=517
This is just weired.
In my case when I took a subversion update, I was getting this problem. The reason was the corruption of my project.properties file (due to subversion conflict).
I just corrected the file and problem got solved.
I found it's just missing project.properties file in the project folder. After copying one from another project the error is gone. The only valid line in project.properties is
target=android-8
If you are using SVN or GIT please check whether the project.properties has conflicts or not.
Sometimes project can not be open because of this.
I hope this is useful to someone and saves his/her time: My colleague was facing same issue and we did almost everything mentioned here, with no luck. In the end we changed the Android SDK version in the manifest file and it worked.
This solution worked for me.
Close Eclipse and delete all .markers inside your workspace folder.
Restart Eclipse (once I had to restart it twice, it hang on the first but worked on the second for no aparent reason).
Of course, it's always safe to back them up first.
When I try to run my Android project(which was working fine yesterday) I get the "Your project contains errors, please fix them before running your application" dialog. But my project has no errors. I've had this problem before, and the solution was always to Clean the project, but this time it isn't helping. The red X icon disappears from the project in the workspace, then reappears when I try to run it. Also restarted Eclipse so it rebuilds the project. Help?
Go to your .android folder and delete your debug certificate. In my computer it is in this path
E:\Users\blessan\.android
Inside that there is a file name 'debug.keystore'. Delete that,clean and try to build the project again. Sometimes this error is caused when the certificate expires.
There are a couple of reasons as to why this might happen. Give these problems / solutions a try.
Problem with your Manifest. These don't always show up, so give your Manifest a thorough check.
Suddenly missing / moved libraries or other dependencies. Right click your project, choose Properties and check the tabs under Java Build Path. When you accidentally remove / move a library file, or any other file the app is dependent on, it can cause an error like this without showing up as an actual error. However in the Build Path screen it will show with a little error sign.
Problems with your R.java. I had an issue with this before where there was a corrupt value in the R.java file. "cleaning" the project didn't fix it, but forcing Eclipse to rebuild the file due to me erasing it manually did.
Problem with a cached version of your app. This one is a real pain cause there are no pointers for it, but sometimes for some reason Eclipse decides to mess with a cached version of your app. This can cause anything from apps not working to apps showing images that have long been replaced by other ones or have been deleted entirely.
If the other fixes don't work, try navigating to your project folder and removing the /bin folder. After that, rebuild the project and try to run it.
I hope one of these works out for you.
This problem is occur some time when you replace new debug.keystore file with the old one.
delete deug.keystore may fix the problem