adding the android environment to eclipse - java

I know that my problem is a very common one , actually I found a lot of people asking about it , but non of the provided solutions worked for me .
I followed the following steps :
1- Installed eclipse for java.
2- installed ADT .
3- installed the SDK
now when I open eclipse I create new android project but it gives me errors without even writing any code .
"R cannot be resolved to a variable"
I have read somewhere that I should choose the location of the sdk , but I can't find the option that allows me to do so .
Also when I open the properties I find that android is there , but I can't find the sdk manager or any of the buttons that should appear in the menu and are related to android.
I would appreciate it if anyone can help me with this , because I have to write an android code and I have one day left .
NOTE : THIS IS NOT HOMEWORK , I need to write some code for a test in my research , and I was asked to do it before two days only ,I've tried and I couldn't solve it alone.

I found the solution I will post in case someone faced a similar problem :
1- first go to windows->customized perspective
2-choose the tab command groups availability and click on the sdk manager .
3- from the sdk manager choose to install Android SDK build-tools.
after installing it , the error should be gone .

Related

Java application launched failed

I have created a .jar file in netbeans in macbook m1 of a sample project to check for
practice. But when i click on the .jar file it shows that
" Java application launched failed.
Check Console for possible error messages related to ”/Users/"user_name >"/Documents/sample/target/sample-v1.1.jar”
I have installed latest version of java in mac also i have searched a lot on internet
.I have also search here but the solution they provide me does not show the right menu
. Options in netbeans . Please help me on this , i have already wasted 2 days in seek
solutions.

Issue while trying to update to SDK tools 26.1.1

Was trying to update SDK tools in android studio to 26.1.1, but I keep getting this error and have to cancel, what can i do about it please?
The solutions is to uninstall the android sdk tools, ...because you tried to install the update before and your internet disconnected..and make files conflict.
https://www.youtube.com/watch?v=9X7Xb54VfoM
give me point if this works.
and i wish the answer accepted.
.
.
.
and download successfully
screen shot

android.bat not opening Android SDK manager

Yes, this question has been asked before. But the solutions on the internet are not working so that's why I am asking it here. I'm guessing the solutions aren't working because I am using newer versions but I'm not sure.
Bit of Background: So I am making a small game in Unity. I have to test it on Android so I can check if there are any problems or not. So I check around the internet on how I may be able to do that. Turns out, I need to change the build settings to android and I also need JDK installed on my computer along with Android SDK Manager so I download them both. I did not install the Android Studio but just the Command Line Tools because many tutorials say that I do not actually need the whole Android Studio because I'm gonna be making the app in Unity not in Android Studio. So I do that. I install JDK and Extract the command line tools.
I think the JDK installed fine because after installing JDK, I opened Internet Explorer (No, I don't use IE, I use Chrome but I opened it just for fun). And a little notification showed up at the bottom which basically said that I could now run Java on the browser so that's why I don't think there are any problems with the JDK installation.
Problem: I extracted Command Line tools of Android Studio and found that there was only a tools/ folder in it. I opened it and clicked on android.bat but the Android SDK manager doesn't work. A CMD screen just flashes for a moment but then nothing happens.
Solution I have Tried:
Change set java_exe to:
set java_exe="C:\Program Files\Java\jre7\bin\java.exe"
and delete the line:
call libjava_find.bat
But I can't find set java_exe code anywhere in the file. The file doesn't have it. How am I supposed to change it?
Alright, so I figured it out but I was still unable to pinpoint the problem. Here is what I did:
Installed a fresh copy of Windows 10. Note: It is highly unlikely that this will solve the problem. But where I live, it is very common to just install a fresh copy of windows whenever you get a problem. I really don't think you need to do this.
Follow all the instructions from: https://www.youtube.com/watch?v=yLFBu-VlBIw
If you get the following error:
Error building Player: CommandInvokationFailure: Unable to list target platforms. Then use this fix: not finding android sdk (Unity)
These steps solved the problem for me and I was able to run it properly.

Eclipse declared package does not match expected package

Thanks for your help in advance! I am having a problem with declared packages, I have downloaded parse from github for android, My project is named Parr, when I go to add it to my project, I click on Parr then right click on src and try to add it, also tried the same under com.examle.parr, I am importing it by going into the file system and selecting the parse project I downloaded, I am selecting to add it into Parr/src/com/example/parr. every class added is added under, package com.parse; I can change them all manually to package com.examle.parr; but their is way to many and I know there is a right way to do it, any help will be much appreciated. On a side note is android studio recommended for use with parse, I do not see any instructions to add it to eclipse on there website, just android studio
On a side note is android studio recommended for use with parse, I do not see any instructions to add it to eclipse on there website, just android studio
Android Studio is recommended for Android Development ,Google doesn't recommend to use Eclipse for Android Development , I would suggest you to switch from eclipse to Android Studio , Then will be much easier to solve the problems quickly you are facing now .
You can solve your problem in Eclipse too ,follow below steps :
1 . Download jar file from here
2 . Add this jar file to you eclipse project (Android)
3 . Rebuild project .
4 . Run project .

How can I modify the DroidGap.class file from phonegap-1.0.0.jar archive in eclipse?

I am really very new on android development.
I have made 2-3 apps , those running on my android device already.
Last few days I am facing a stupid problem.
The problem is , creating the app fullscreen for every device. I have read phone gaps wiki
and tried with specific way. But I failed everytime.
When I'm trying to open the DroidGap.class from my Android eclipse project explorer , I got a error. that, "DroidGap.class has no source attached". (after build the phonegap.jar)
Please help me....
first you need to add phonegap.jar to your project
you need to add phone gap plugin to your eclipse
Use the AppLaud Eclipse Plugin for PhoneGap Android
Download and unzip the PhoneGap sources from GitHub
In the AppLaud wizard, select "Enter path to installed PhoneGap"
Enter the directory path to the unzipped sources from GitHub
Now you will be able to modify and debug the sources that comprise phonegap.jar
Caveat: I'm the creator of the AppLaud Plugin
fullscreen?
If you want modify DroidGap.class dowload source code from github and rebuild phonegap.
Rebulid instruction here: https://github.com/callback/callback-android/blob/master/README.md

Categories