[Q] Problem getting started on Android Studio - IDEs, Libraries, & Programming Tools

Hey guys,
I have been having trouble getting started developing applications for android. I know how to use Java, and frequently use the netbeans ide for my java homework ect. But I decided why not adventure out and build upon what I learned in school. Unfortunately I have ran into nothing but problems. The first problem is this:
"Gradle project sync failed. Basic functionality (e.g editing, debugging) will not work properly. "
In the messeages window it reads:
[file path to \app\build.gradle]
Failed to Find: com.android.support:appcompact-v7:21+
I have had trouble using grade in eclipse....well I only got eclipse to work once, when I first got my phone, and managed to make a small pop-up app for my self. I did not know any programming language at the time. I merely just copy and pasted most of the code.
and problem number two;
The generated code is riddled with errors?
I look through most of these errors and they state that certain things can be resovled. For example, cant resolve "support" <--- I think that by not having this imported correctly (I think this falls into the first problem) is causing the rest of the errors in my MainActivity file to go crazy.
Is their any way to post more information? Like a log file, maybe that might be of more help too. I just am unfamiliar with Android Studio, as of right now. Attached is a picture of the IDE when is spawns the error.
Thanks for the help in advance!

How to Fix said issue
KJ4CCH said:
Hey guys,
I have been having trouble getting started developing applications for android. I know how to use Java, and frequently use the netbeans ide for my java homework ect. But I decided why not adventure out and build upon what I learned in school. Unfortunately I have ran into nothing but problems. The first problem is this:
"Gradle project sync failed. Basic functionality (e.g editing, debugging) will not work properly. "
In the messeages window it reads:
[file path to \app\build.gradle]
Failed to Find: com.android.support:appcompact-v7:21+
I have had trouble using grade in eclipse....well I only got eclipse to work once, when I first got my phone, and managed to make a small pop-up app for my self. I did not know any programming language at the time. I merely just copy and pasted most of the code.
and problem number two;
The generated code is riddled with errors?
I look through most of these errors and they state that certain things can be resovled. For example, cant resolve "support" <--- I think that by not having this imported correctly (I think this falls into the first problem) is causing the rest of the errors in my MainActivity file to go crazy.
Is their any way to post more information? Like a log file, maybe that might be of more help too. I just am unfamiliar with Android Studio, as of right now. Attached is a picture of the IDE when is spawns the error.
Thanks for the help in advance!
Click to expand...
Click to collapse
Ok guys, I figured it out. We need to install a package from the sdk manager. The picture shows which one needs to be installed. The package is "Android Support Repository"

Seems you have already gotten the answer. But for this kind of questions, past the main line of the error log into Google is much faster than post a question, I think.

Related

Can't compile, always errors (any script, caused by IDE)

No matter what I do or use, (Aptana or Eclipse) errors always show in the XML files and I can never get anything to run.
I've done google searches and I can't find answers...I also can't seem to force ignore the errors in the IDE.
The other day I almost broke my keyboard, it's driving me crazy because it's such a stupid issues I can't seem to fix.
PLEASE, I just want it to work...xda is my last resort, I don't want to bug you guys about this, but I just want answers.
*** BUMP ***
without the files and errors no one here can help you.
http://pastebin.com
nenn said:
without the files and errors no one here can help you.
http://pastebin.com
Click to expand...
Click to collapse
You want me to upload the entire eclipse/aptana setup I have?
This is not unique to the sources, this happens with any code...this has something to do with my IDE setup.
Same thing happens on my workstation and my desktop at home.
in the spirit of understanding the problem, how far along developing are you? have you tried compiling the sample code thats out there already?
without information on what you know how can anyone help you solve your problem?
nenn said:
in the spirit of understanding the problem, how far along developing are you? have you tried compiling the sample code thats out there already?
without information on what you know how can anyone help you solve your problem?
Click to expand...
Click to collapse
Yes, can't compile anything...it always tells me an XML error.
I'm not at a point where I can give you the exact error, but I probably can tomorrow.
Start Eclipse and delete all Errors in the Problems View.
Then try to recompile.
Sometimes it solve the problems
Post the xml manifest and errors.
It is a pain to get started. Take a break and try again.
I would recommend un-installing Eclipse and any Android SDK stuff and start from scratch re-installing everything. If you haven't already, use the Android developer section walkthrough to set Eclipse up properly. They indicate which versions of Eclipse and the JDK to download. Maybe you installed the wrong versions of Eclipse or JDK?
Just something to try.
PM Kingklick he's the best at compiling Android.

[Q] Source not found in Eclipse

Hey there,
I started developing Android Applications a few days ago.
Now, I wrote a Program wich is about to call a new class/activity.
But always when I launch the Program and it want to call the new activity, the errormsg "Source not found" occurs in the debugger.
I created the class with a leftclick on the existing class-file -> new -> class.
I know, the Internet is full with informations about "Source not found" but i didn't find any informations about exactly this issue.
Would be nice, if someone could tell me, what I did wrong...
Thx and greez Visosilver
Please elaborate on what you are doing. Does your app start? Does this happen when you are debugging your app?
I imagine that you are debugiing and stepping through the code. If you try to go into a method from the framework you need to attach the source code for the framework otherwise you get the message "Source not found"

Need help installing the Android SDK

I've read the other threads about this but there is no help to be found there unfortunately.
I've been playing with App Inventor because I wanted to avoid learning Java but my think now is that seeing as I do JavaScript/PHP/mySQL and HTML/CSS anyway I might as well do my app development properly.
I've been following the instructions at the official developer.android.com site.
and the part where I have the problem is with Eclipse - at step 1 on that page. I've installed the JDK but when I try to install Eclipse I get an error telling me that there is no Virtual Java machine in the eclipse\jre\bin\ folder.
Well I'm following the instructions so what can I do about this? I don't even understand the error. Is there supposed to be a file in this folder, a folder which a.doesn't come with the standard Eclipse .zip file and which b.doesn't exist at all!
I tried this all before some time ago and got the same problem. At that time I couldn't even use App Inventor because of some JDK/JRE problem but I un-installed and reinstalled Java and App Inventor is working now.
This is one of the most frustrating computing problems I've faced because I've searched all over for an answer and there is nothing out there. Frankly I'm a little surprised at how poor the installation documentation is
The only thing I can think of is I have the wrong version of Eclipse. Which exact one is everyone else using?
Hello Subjective Effect. There is not a folder named eclipse\jre\bin in eclipse installation folder. The version i m using is eclipse-helios. I was not faced the problem you have.
I've solved that part of the problem by downloading a different version of Eclipse. It is a Helios version and is the one with Java. The installation instructions are not clear on this.
I now have another issue but I'll try work that out for the time being.
So I've no idea (again because the instructions are so poor) what to do about this.
I'm on the Android Developers site and trying to start the Hello World tutorial. I'm already stumped at the stage of creating a New Project because after I set up Project name, Application name, Package name and Create Activity clicking "Finish" gives this error:
[2010-10-28 01:33:03 - HelloAndroid] ERROR: Unable to open class file C:\workspace\HelloAndroid\gen\com\subjectiveeffect\helloandroid\R.java: No such file or directory
The reason I think the docs are poor is am I supposed to have created this directory or does Eclipse create it for you? And if it's supposed to be created for you what am I doing wrong?
Subjective Effect said:
So I've no idea (again because the instructions are so poor) what to do about this.
I'm on the Android Developers site and trying to start the Hello World tutorial. I'm already stumped at the stage of creating a New Project because after I set up Project name, Application name, Package name and Create Activity clicking "Finish" gives this error:
[2010-10-28 01:33:03 - HelloAndroid] ERROR: Unable to open class file C:\workspace\HelloAndroid\gen\com\subjectiveeffect\helloandroid\R.java: No such file or directory
The reason I think the docs are poor is am I supposed to have created this directory or does Eclipse create it for you? And if it's supposed to be created for you what am I doing wrong?
Click to expand...
Click to collapse
Mine seems to have that error no matter what I type in.
So what have you done about it? Or can I continue without worrying, is this a trivial error message?
1) you should download Eclipse 3.5.2 as Helios is not supported by Android plugin yet.
http://www.eclipse.org/downloads/packages/eclipse-classic-352/galileosr2
2) R.java problem should go away if you restart eclipse
Also, to start with better use the existing sample project HelloWorld rather than setting up your own.
This is a common known bug. You can use the latest eclipse version, once you setup a project, you will have to go under project properties and choose compiler version 1.6, which is set to 1.5 usually.
Tha will solve the problem, because i was facing the same a few days ago when starting to mess with SDK and Eclipse.
I had a similar problem and gave up for awhile and when I came back to it I found out that I didn't have my paths set correctly for the java jdk, not sure if that is it but it worked for me.
I find if I restart Eclipse it fixes things.
I've been playing with layouts!

[Q] Developing on Device

I have programmed in java for quite some time, and am decent at android apps.
However, i have two questions about developing on my device (rooted samsung captivate).
First, how can i get dev tools to run correctly on my phone. I have installed it as stated in "developer.android com/guide/developing/debug-tasks html#additionaldebugging". However, when clicking on Dev Settings it crashed with HARDWARE_TEST security exception. I have read that you need to sign/run it as system.
Is it possible to run it on my rooted captivate? if so how do i install it as system or find the system signature to sign it.
My other question is about programing, compiling, and running android applications from a device. I can take my .apk and unzip it. Then edit any resource files. Then rezip and sign it. However if i want to replace the actual code i need to compile it. I can use an online java compiler but i need to convert it to android format.
I know that dx.bat does this by using dx.jar . I can add dx.jar to the referenced libraries of my app. However i cant figure out what to do past there. Is what i am attempting even possible?
Thanks for your help.
There's a couple threads in this forum from folks like me who want to do this. Perhaps you can help us figure it out
Step one is I think to get an java compiler running on the phone. Then to make a version of DX that can run on the phone to convert the class to .apk
Thanks. in normal java programs you can use "com.sun.tools.javac.Main.compile( new String[] {args} );" found in the "<sdk>/lib/tools.jar" to compile a program. And dx.jar is what is used to covert it to android, however i do not know what to call in it.
We just need to find a way to get these jars to work on android.

Can't get Android Studio to work - Gradle issue

Hello XDA.
I have used Eclipse, and wanted to try out Android Studio.
The problem is, when creating a new project, i get a "Resolve Error":
Failed to import Gradle project: Could not create an instance of Tooling API implementation using the specified Gradle distribution 'h**p://services.gradle.org/distributions/gradle-1.6-bin.zip'.
Could not determine implementation class for service 'org.gradle.tooling.internal.protocol.ConnectionVersion4' specified in resource 'jar:file:/C:/Users/Me/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6/lib/gradle-launcher-1.6.jar!/META-INF/services/org.gradle.tooling.internal.protocol.ConnectionVersion4'.
C:\Users (Access is denied)
Consult IDE log for more details (Help | Show Log)
Click to expand...
Click to collapse
Seems like noone else got this problem.
I run as Administrator.
Why XDA, WHY?
Are you really creating totally new, empty project? That error message sound more like your gradle has problems importing an existing gradle project.
I'm running into the same issue, and yes, when creating a totally new project this error raises... Even though, after pressing ok, it continues loading (linux version)...
Sent from my LG-P350 using xda app-developers app
Broke'n'Droid said:
Are you really creating totally new, empty project? That error message sound more like your gradle has problems importing an existing gradle project.
Click to expand...
Click to collapse
Yes, like dbarrera said.
This is Windows version.
Any idea?
Have you tried updating your SDK and have you checked your gradle.build in root folder for any errors?
Sent from my SAMSUNG-SGH-I747 using xda premium
ansfent had
tepews said:
Hello XDA.
I have used Eclipse, and wanted to try out Android Studio.
The problem is, when creating a new project, i get a "Resolve Error":
Seems like noone else got this problem.
I run as Administrator.
Why XDA, WHY?
Click to expand...
Click to collapse
I ran into all sorts of trouble trying to set up Android Studio on my Windows 7 64 bit machine: Missing environment variables, mismatching JRE/Android SDK versions, Gradle compatibility issues, etc., etc. After serveral failed attempts, I finally gave up and went back to my old reliable ADT/Eclipse IDE. I don't want to sound pessimist, but I would give it a little more time.
hey Guy's...
if you have problems with gradle try to download the gradle-1.6-bin.zip from http://services.gradle.org/distributions/gradle-1.6-bin.zip and then copy it to the *\Android\android-studio\lib* directory.
"
Download Gradle from its distribution page at http://services.gradle.org/distributions/gradle-1.6-bin.zip
Then you should copy all the contents of gradle-1.6 to \Android\android-studio\plugins\gradle directory
You should also copy the gradle.jar file to \Android\android-studio\lib\ directory"
Finally you should restart Android Studio. After restart everything should work fine.
let me know if it work`s :silly:
It`s Weekend... :highfive:
I have a lot of problems with Android Studio, so I will work with Eclipse until Google fixes all bugs.
still not working...
dude1986 said:
hey Guy's...
if you have problems with gradle try to download the gradle-1.6-bin.zip from and then copy it to the *\Android\android-studio\lib* directory.
"
Download Gradle from its distribution page at
Then you should copy all the contents of gradle-1.6 to \Android\android-studio\plugins\gradle directory
You should also copy the gradle.jar file to \Android\android-studio\lib\ directory"
let me know if it work`s :silly:
It`s Weekend... :highfive:
Click to expand...
Click to collapse
I've tried this process, but it's not working...
Everytime I try to start a new project, I receive a message:
org.jetbrains.plugins.gradle.settings.GradleSettings cannot be cast to org.jetbrains.plugins.gradle.settings.GradleSettings
Do you know what could be causing this?
Thanks in advance.:good:
Finally you should restart Android Studio. After restart everything should work fine.
Hi,
If anyone has trouble with Android Studio, try to install it not in C:// (for Windows), but in another partition. I use it, and it always worked. And also, Android Studio usually will download Gradle by itself automatically.
If the problem still persist, try to re-install (re-download the newest version if necessary). Based on my tips above.

Categories

Resources