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 .
Related
So my friends and I are making a game for Android and we are using Android studio. We are using libgdx. We are also learning how to use github. Anyways, using Android Studio, I uploaded the basic libgdx setup. The one that just displays the Bad Logic image. My friend downloads it from github using Android studio but there are errors everywhere. It says that it can't find the badlogic package and it gives the following error:
This project does not use the Gradle build system. We recommend that you migrate to using the Gradle build system.
I know that libgdx uses gradle. So what is the problem? Why can't we simply upload and then download a simple project?
Thanks!
Try to remove the .gradle directory and re-import the project or use the Setup App Installer from here to create a new gradle project.
Thanks for the help! I finally figured it out.
Basically, when I imported the project, I was just importing with existing project files. These are the steps I took to get it fixed.
Check out from Version Control using Android Studio and the welcome screen.
When asked to open, say NO.
Go to the folder that is associated with the repo.
Create a local.properties file there and in that file it should have
sdk.dir = /YOUR/PATH/TO/SDK/HERE
Then go back to Android Studio.
Click Import Project and select the folder that has it in there.
From then on, it should work forever as the .gitignore file that is generated by libgdx will ignore the local.properties file when pushed. I hope this helps someone!
Now, i have problem that in the AndroidMenifest.xml, all of classes is wrong. And in Studio the APP can run , but is just flash past . before import to Android Studio, in the Eclipse , it' runs right . Anyone has an idea what's going on?
I really appreciate it .
In newer versions of Android Studio, the best way to bring in an Eclipse/ADT project is to import it directly into Android Studio; we used to recommend you export it from Eclipse to Gradle first, but we haven't been updating ADT often enough to keep pace with Android Studio.
In any event, if you choose "Import Project" from the File menu or from the Welcome screen when you launch Android Studio, it should take you through a specialized wizard that will prompt you that it intends to copy the files into a new directory structure instead of importing them in-place, and it will offer to fix up some common things like converting dependencies into Maven-style includes and such.
It doesn't seem like you're getting this specialized flow. I think it may not be recognizing your imported project as an ADT project, and it's defaulting to the old built-into-IntelliJ behavior which doesn't know about Gradle. To get the specialized import working, the following must be true:
The root directory of the project you import must have an AndroidManifest.xml file.
Either:
The root directory must contain the .project and .classpath files from Eclipse
or
The root directoy must contain res and src directories.
If your project is complex, perhaps you're not pointing it as the root directory it wants to see for the import to succeed.
Thank you.
I'm interested in running the Android Support library demo projects for the v4 library.
Using the Android SDK manager I've installed the Eclipse plugins, and APIs from 2.2 to 4.0.1. There are several issues involved, and the sample project as provided is far from running on my configuration, as downloaded.
To reproduce this error:
Install SDK and Eclipse Juno
Import the sample v4 compatibility project using File --> New --> New Project and choose "from existing code", targeting, for example, the Support4Demos folder in <Android-sdk-path>/extras/android/support
Open the file AccessibilityManagerSupportActivity.java. The following errors appear.
Open res/values-v11/styles.xml. The following errors occur.
How do I get rid of these errors? I'd also like to understand why they are appearing so I can fix them in the future.
Thanks!
Clean solution is to:
Right-click your project.
Choose "Android Tools"
Choose "Add support library".
Install the appropriate support library (the newest)
I can't really answer you on the why this problem happens, but I'm guessing the Android team doesn't supply the Android support library, because it's changing all the time, so not to get stuck on some older version, they want us to supply it on our own.
If errors still persists or new errors come up, right-click the project again and choose "Android tool" -> "Fix project properties"
Update: In conjuction to my answer, the way to remove the rest of the errors is to import the project another way than you did.
Select File -> New -> Other
Click Next
Write Android Sample
Select Android sample Project and click Next
Now add the Android support librarys as described above.
You will get errors still however. To fix these, do the following:
Right-click your project and select "Properties"
Select Android
Select an SDK version equal to 3.0 or above
Select Ok and clean the project from the project menu.
All done ;-)
Now you won't be able to run the sample project on devices lower than Android 3.0.
The reason is because of some dependencies on some themes and settings, that wasn't added before Android 3.0 apparently.
It doesn't make sense why Google did this, but they did. You could try to remove the SDK +11 (Android 3.0) specific dependencies, but it will take some time - there are more errors than you actually see - especially in the XML files.
You have to add the v4 support library.
In order to do that , please follow these steps :
Select your project.
Click on Project from the menu.
Select Properties.
Click on Java Build Path.
Select the Libraries tab.
Click on Add External JARs.
Select the main directory of the Android SDK that you installed, then go to extras -> android -> support -> v4 , and then select android-support-v4.jar and click on Open.
Click OK.
This should remove the errors.
Please check your libs folder has android-support-v4.jar is present or not. if not add this jar file in libs folder.Just copy the android-support-v4.jar from any project and paste it to the libs folder of your project
I spent a whole night on this but can not solve this problem.
I finally solved the by accident: change some file in the demo and save, then change it back, this cleared all the errors. I think when you change some file and save, eclipse build the project and generate the R.java.
I'm trying to import facebook sdk libraries into my android project and I successfully imported them . Now I want to import facebook sdk classes into my project, but I can't import them. What is the problem ? What am I doing wrong ? And when I checked again that fb sdk are added or not I see This error. Please help me out if am doing any thing wrong
I don't know if this is a good way but I uploaded a video on youtube and shared the link here, sorry for video's poor quality,but it's only a 25 seconds video.
cracked it after hours of frustration....
well it goes like this.
stand on the FaceBook Project you have created by the instructions of faceBook developers.
right click and choose the properties , choose android and choose an android API from the list , press apply and ok.
clean the project and see that the error disapeard.
now it's the time to go to your project , press the right click and choose properties.
go to Android , press the Add button and choose the faceBook project.
press applay and ok .
clean the projects just for good luck . and now you finally can impory com.facebook !
hope it will save some poor programmer valuble time in the future .
you should follow this steps and guide facebook
Your sdk and your project should be in the same path. If not the library will not be properly loaded. Check if your project is in the same path as your facebook sdk. Or copy the sdk to the same folder of your project and then load that as library.
The problem is that the Facebook SDK still remains in your C:/Downloads folder. You have to put it in your Eclipse Workspace and then import it. It worked for me!
I was facing a similar issue. My project work space was in another directory and the SDK in another and based on the tutorials, I preferred to keep them that way. The solution is to include the Facebook SDK into your project's build path. You could do this in properties or click on the error icons > organize imports and it should automatically give you an option to add the SDK (if found) into your build path. That should work!
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