Android: Eclipse won't run Android projects - android

I have an issue where every time I try to run a project (that has normally run before), eclipse tells me I have compile errors. There are no errors in the code, the console is empty and I haven't changed anything in the build path...recently. I can actually export the application and install it on the phone and it runs fine, but playing from Eclipse if broken for some reason. I wish I could give more info, but there is nothing to show :/
EDIT: I can't even run a new project. I just tried to make a Hello World app and it still says I have compilation errors. I don't know if this might help so I figured I would add it.
EDIT 2: Problems tab stats this: "Description Resource Path Location Type Error generating final archive: Debug Certificate expired on 3/30/12 10:10 AM TestApp Unknown Android Packaging Problem."
FIXED: debug.keystore issue fixer upper
Help?

Go to window --> preferences --> Android --> build, see where Eclipse points to your debug.keystore, go there delete it, and relaunch Eclipse.

Related

IntelliJ compiles successfully but no signed apk is generated

I recently updated my android SDK platform, since the update when i try to generate a signed APK in intelliJ idea i get no error in compilation and packaging process (even proguard works fine) but no apk file is generated in the destination. I am able to run my app on emulator and devices, means that debug apk is generated correctly.
I tried cleaning and rebuilding, no luck. I thought that this might be a problem with project settings, so i tried to generate APKs for other android projects or even an empty Hello World project, the problem still exists.
Is there any log files or other things that i can post here to help clarify the problem?
Well, this was an irrelevant (to android SDK) problem that i was struggling with last two days.
The problem solved by removing following directory:
%HOME%\.IntelliJIdea14\system\caches
had just the very same trouble, have tried around and got it to my surprise. So the how do to is a better hint:
Make an Ant-Build
Build .. Generate ant on the left side add it press "play"
Build your project.release ..
.. .. Now here I got a clear Error message:
"wrong android sdk build-tools version" hopefully you will get the right for you.
some apk's were generated but not installed on a phone.
Still I was not able to generate signed apk.
Deleted the ant build xx .., restarted IntelliJ 15.x
tried.xx.. now it works. hope it helps.

Android Studio stuck while building application

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.

Can´t Run or Export Android Application after incorporting Facebook sdk to my project

I don´t know what I did... Everything was working well, had to battle a while to get facebook login working, and doing what I wanted to do... Finally it was ready, so I proceeded to Export Android Application... First error had to do with Dalvik code error 1 something... So I look for duplicates .jars in my folder, erased libraries in java build path, cleaned the project, etc, as proposed in some stackoverflow answers...
Stopped getting that kind of error but now I can´t even Run the application, now I get some errors like: Unable to execute dex: GC overhead limit exceeded, or: Unable to execute dex: Java Heap Space.
In my windows machine it gets stuck until some memory related error is displayed... in my Mac the Eclipse is forceclosed in most occasions ... I tried to roll back and took off the facebook sdk part, but nothing, now I can´t run/export my app even as it was before... I guess I did something wrong in the cleaning or something in the Eclipse parameters..
Please help, I´m dying here.. Thanks.
Answering myself to help others:
1.Check there´s no duplicate .jar anywhere in your project.
2.Go to eclipse.ini in your Eclipse folder, and modify to this, or greater:
-Xms512m
-Xmx1024m
3.Save and restart Eclipse
4.Go to Project -> uncheck Build Automatically
5.Go to Project -> Clean... , clean both the library project and your app project
6.Export your app as a signed APK while Build Automatically is still disabled
7.Re-enable Build Automatically and everything should be back to normal as before

Gradle: error: illegal unicode escape

I recently updated to the most recent Android Studio version (0.2.x), and I am experiencing an issue where I cannot build the project. I receive an error message stating:
Gradle: Execution failed for task ':TestApplication:compileDebug'.
Compilation failed; see the compiler error output for details. C:\Users\user\AndroidStudioProjects\TestApplicationProject\TestApplication\build\source\r\debug\com\example\testapplication\R.java
Gradle: error: illegal unicode escape
Now, I understand I was supposed to reinstall Android Studio as per instructions:
Windows users: Do not install Android Studio 0.2.x in the same location as 0.1.x.
Doing so may cause errors such as ClassCastException or other unexpected behaviors.
It's best if you remove your previous version of Android Studio 0.1.x.
And I actually did, I uninstalled Android Studio, and deleted the remaining folder (Which is apparently not deleted after uninstall) stored at: C:\Users\user\AppData\Local\Android
I then proceeded to clean the registry entry just in case (I tried this on my 3rd attempt after not getting it to work), and rebooted before re-installing.
After the PC rebooted, I proceeded to do a fresh install of Android Studio, it installed successfully. I created a Test Project from scratch (to make sure it was not a problem with opening previous projects), but right after it opened the project it's already showing the build problems. I tried running it and it simply won't compile.
What's even more strange is that all of the problematic lines according to the compiler output are commented lines in the R.java. Here's one:
/** From: C:\Users\user\AndroidStudioProjects\TestApplicationProject\TestApplication\src\main\res\values\dimens.xml
And it points to the character 30 of that line, which is right between the u and the s of the word user (image attached). I actually tried deleting the comments, but as you'd expect the R.java was generated automatically when I asked for the project to be rebuilt.
I have absolutely no clue what the problem is, any ideas?
Known issue. We have fixed it internally already. Should have it out very soon (couple of days max)
I had the same problem and I was using a path similar to yours.
What I did was move the project to the root of the C drive, so the path doesn't start with "C:\Users\user" anymore and the problem is avoided... Not really a solution, but a workaround.
PS: This is not really an answer, but I don't have enough points to comment yet and this might help someone.

AndEngine Examples not working

I configured the AndEngine example on my eclipse a day ago by following a video tutorial. It was running fine. But the very next day, when I tried to run the example, it says your project contains errors. I check the properties of project and other things but found nothing like error. I am unable to figure out what is causing the project to build. Can anyone help me in this regard?
I can't see any error. I just show a cross on Examples project. I deleted all the extensions and examples and redownloaded but error stayed there. Here is the screenshot of eclipse.
Sometimes, when I delete some other project, it gives the following error message:
An internal error occurred during Re-indexing repository AndEngine Empty path not permitted.
Ah, I got rid of problem. Actually my debug certificate was expired. That's why it was not building the project. I deleted the Debug.keystore file from .android folder to regenerate the keystore.

Categories

Resources