I'm new to this, so please bear with me. I simply want to get the basic App Engine Connected Android Project to work in eclipse.
I first downloaded Eclipse 3.7 and the Android SDK. I installed the ADT plugin through eclipse. I configured eclipse to point to the sdk and created an android project. I added some widgets, messed around with SMS messages, and ran it on my phone. Worked like a charm.
Then I decided it was time to work with app engine. I downloaded the Google plugin for eclipse from within eclipse using this link http://dl.google.com/eclipse/plugin/3.7. I also downloaded the Google App Engine Java SDK from that link.
Ok, here's where it gets more fun. I created a new app engine connected android project and named it "TestProjectThree". I then clicked "Debug as->local app engine connected android project". On the console I got a url, but on my phone I got a black screen. I then noticed that there was nothing in the android/gen folder, so I did a clean build of both projects. Suddenly, it gave me 10 warnings.
"Cannot fully validate context since domain type com.testprojectthree.server.HelloWorldService is not available.
You must run the ValidationTool as part of your server build process."
I googled the problem and found this link http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation.
I began following the instructions. I tried to enable annotation processing, but it was already enabled. I tried to add the requestfactory-apt.jar to the factory path, but it was already there too.
Apparently now I need to run something called an Annotation Processor. I've never used Maven before but I right click on my android project->configure->convert to Maven project. I do a clean build and a POM file appears. I then copy all of the XML from that link to the line right above the /project line in the POM file. I copy the second bit too because I'm using indigo. Clean and build again. New error.
"/TestProjectThree-Android/gen already exists but is not a source folder. Convert to a source folder or rename it."
No idea what that one means either, but I see right click gen->build path->convert to source folder so I click that too. Clean and build again. NO ERRORS!! YAYAYAY!!!
Debug as local app engine connected android project. Got a black screen on the phone, and some sort of error in eclipse. “Source not found”. Looked for a more detailed error message but the console just has the app engine url on it and logcat looks empty.
I went back to the link about the validation tool and read all the comments. A lot of people seemed confused. I have no idea if I did it right, or did any of it right, and am very lost now. Please please please help me!!!
This sounds very similar to a problem I had, although not exactly.
I think the code generated by the AppEngine project that is used by the Android project is either not generated correctly, or needs a refresh.....and clean doesn't do it.
Try this:
First, make sure the requestfactory-apt.jar was in the "Factory Path" of "Annotation Processing" in the "Java Compiler" section of Project Properties.
In AppEngine project.
Properties-> Java Build Path, Source section. Select the ".apt_generated" entry and then "edit…" and rename it, by putting a "1" at the end of the name (or whatever).
Project -> Clean
then in Android Project
Properties-> Java Build Path, Source section.
Select the "apt_generated" source folder that is linked to the ".apt_generated" source folder in the AppEngine project.
"Edit…", then in the first line "Linked Folder Location" navigate to the NEWLY named folder in the AppEngine project (the one with the "1" at the end……)
Then Project -> Clean
Then build & run your Android project, it should now have newly generated RequestFactory code from AppEngine project and validate OK at runtime.
It's possible that closing and opening projects and cleans were also required.
Use parse. I tried using AppEnging for my app's backend, but parse seems to take care of a lot of backend jobs and makes life extremely easy https://parse.com
Related
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 been trying to get a sample app off of http://f-droid.org/repository/browse/ for some time. I just want to test the app to see how it works and understand it better. Every time I try to download one though, I click on "source code" and get a screen that looks similar to BitBucket (which I don't know how to download from) or I get a Command Prompt command that gets me the correct code, but the code won't run for one reason or another regarding R.java problems.
The code on the site is supposed to work already so I'm guessing its something I'm doing. I'm just copying the files into my IDE (Motodev Studio) and cleaning the project once I've tried to get rid of what seem like trivial errors. However, when I finish messing with it, the IDE states that R.java cannot be resolved. I know the question as to why that is the case has been asked many times on this site already so I'm just going to assume that the error is with me and not with the IDE. Is there a special way to get these full samples down from the site? Is there a site that is easier to get full samples off of? Please help!
After downloading tar.gz file
untar/unzip the file
In eclipse
File - > Import-> Existing Projects into workspace -> give the path and click browse and then click finish
A folder with project name will be crated in your workspace.
check the project properties by right click on the project and set target for the project
some error will arise due to #override. so remove it
Run the project
You do not mention anything about the sample app you are trying to download and compiler/run. Picking a random example from the page called Abstract Art, there is a Source Code link which takes you to the code repository. From the code repository (In this case Github), you can download a zipped folder with the source code. Unzip and import into your IDE. Motodev Studio should have tutorials that will help you import the code you downloaded and compile.
You are going to need to learn about source control as the various apps on that site either are using git or subversion or mercurial. Each of those version control systems have numerous tutorials so its worth your while to learn about it.
Alternatively download and untar the 'tarball' on each page which should have the source.
The problem
I have a strange problem with SpringSource Tool Suite 2.9.1 Release and Subversive plugin, running on Windows 7 Home Premium x64. I'm trying to checkout an android project from an SVN repository.
Here's what I'm doing:
File > Import > SVN > Project From SVN
I fill in the path to my repository and check the HEAD revision
I click Finish
The project is found and the default option is Check out as a project with the name specified. I leave the name alone Set the Depth field to Recursively and again, select the HEAD revision.
I click Finish
A progress bar appears for a second just to show an error message:
Checkout operation for 'https://(.....)/Android' failed.
svn: Cannot create new file 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn\lock': System can not find the path specified
When I retry and follow the steps from 1 to 6, another dialog appears. It says:
This project already exists in the workspace
or there is a data folder in the checkout destination.
It allows me to select a folder to overwrite. When I do that, a similar but different error message is shown. It says:
Checkout operation for 'https://(...)/Android' failed.
0x0000000f: The folder 'C:\workspace-sts-2.9.1.RELEASE\AppName \.svn' is locked by some external process. Please unlock the folder and try to check out the project again.
What I've tried
First, I opened the SVN Lock view to see if there were any locks created by the IDE. There were none.
I restarted the computer, hoping it would solve the problem of any application locking the file but this does not seem to be the case.
After that, I created a new workspace in a different location and tried to check out the project in there. The result was the same.
Then, I attempted to change the version of SVN Kit. The situation persists in:
SVN Kit 1.2.3
SVN Kit 1.3.5
Native Java HL 1.5.4
Native Java HL 1.6.12
I thought that changing permissions to the directories of my workspace was worth giving a try. It didn't do the trick either.
Finally, I checked out the project in a different location, using Tortoise SVN and imported it into my workspace. I could run it (though some build path settings seemed to be missing) but it's not a solution. I can't possibly imagine working on the project simultaneously with a couple of people without the ability to commit/update/view history/resolve conflicts in my IDE.
I was advised to install a separate version of eclipse with its own set of tools and a different workspace for this application alone but it doesn't seem like a good idea. I'd like to keep it all in a single IDE. I'd also prefer to avoid reinstalling the whole thing as I don't feel like configuring all the other tools (mostly spring and android-related) from scratch.
Has anybody seen a situation like this? How can I get it working?
It's uncear to me whether this is a subversive problem or an SVN problem. I would try checking out from the command line (you must install SVN command line tools to do this, but I'd recommend having the tools around as a backup anyway).
Checkout from the command line and then import into STS using File -> Import -> Existing projects into workspace. Once in the workspace, you can select the project -> Team -> Share project to get svn support on it.
Rename the project and check out again , It must be a problem where u are trying to checkout the project which already exists with same name in the Package Explorer
I am a very beginner in android development using eclipse..
I have given an assignment to modify the android application made by a professor..
so I downloaded the file and imported it to eclipse.
My professor can normally run the program..
however, when I tried to test it before modication using simulator, " the application is forced to stop unexpectedly" is shown..
Moreover, I found that all .java file in src contained "x" ...and the codes in the .java file, like "import android.graphics" or "private class xxx" all contained error..which i have been told that "import andorid.graphics" cannot be resolved..
Could anyone tell me what's wrong with the codes...
and kindly provide me the procedures to fix this problem?
is it possible for me to send the zip file to someone..so that he/she can help me find out the problem??
Make sure the Android sdk and ADT are configured properly in Eclipse and you have updated the relevant packages using SDK Manager. Best way to test this is to create a HelloWorld Android app
http://developer.android.com/sdk/installing.html
Assuming that you have correctly installed the same Android SDK that your professor is using, the first thing to try is to right click on the project name, then select Android > Fix Project Properties.
I've often found that importing existing Android projects into a workspace can be problematic, especially when the project comes from a different machine. A work-around is to create a new Android project, then copy all the sources and resource files into the new project. It's a pain, but it avoids many problems that arise due to different development configurations.
eclipse is working fine with importing a project which already exist. But i am facing problem while am creating a new project in the android.
And then am trying to change the path in the properties of the project which i have created then it is showing some kind of error and screen shot of it is
Can any one help me in this.
Assuming your d: drive is an actual hard drive you have the android-sdk in, and not some DVD/CD drive you tried installing the android-sdk from.
You should click on your new android project folder, right-click and click on "close unrelated projects", then the right files will get generated correctly (re-initiate a manual rebuild if you have to).
The problem was that Eclipse was trying to rebuild all the projects you had in your workspace, a number of which already contained errors in them. Not only those other projects were clogging up your error log, but when an error is detected by the packager/builder, the building process gets stopped entirely.
Now just in case this wasn't your only problem, do Help > Check updates
After that, click on the menu Window > AVD Manager and something
and make sure that you have the latest SDKs and AVD updates already installed.
Also be aware that Pulsar is not the recommended version of Eclipse for doing Android development, although this probably wasn't what was causing your problem.