Nooby question, I guess, but.
I downloaded free android engine called Angle from here.
There is a source and an example. I imported this project to Eclipse and now getting errors:
Project 'ANGLE' is missing required source folder: 'gen'
and there was no such directory in package, so, I guess, I need to create it? In my helloWorld created without any libraries I have R.java in this folder (gen/com/companyName/appName/R.java).
Also, there was another error - project was for "android-3", and I have sdk beginning with 2.2 (android-8). So I changed target to android 2.2 and got an error
Android requires compiler compliance level 5.0 or 6.0.
Found '1.7' instead. Please use Android Tools > Fix Project Properties.
So, what are "android tools"? Never seen this option.
Thanks for any help. New to Eclipse, new to Android, so need some advices.
Do mouse right click on your project and you will see "Android tools" in context menu.
Right click on your project and select Android Tools > Fix Project Properties
If it's does'nt work, Right click on your project => properties and select an android sdk version. Clean the project and rebuild.
To convert the project to Library project, Right click => properties => Android => Is Library => OK
Right click on project => Android Tools
also try to change compliler to 1.7
to connect library project : right click=> android => Add and choose library project
Related
I want to change the project name in Android Studio. I have found some answers on Stackoverflow but it didn't work for me. Please suggest me some suitable solution.Currently I'm using Android Studio 2.3. Thanks always :)
You need to perform a few steps
First move to project view and click on the small settings icon on the top right corner of project view, make sure the compact empty middle packages option is checked
Right click on your java folder and choose Refactor>Rename>change to your desired package name and confirm Refactor
than you MUST also change the project id in your build.gradle file
double check if your android manifest.xml refactored too(android studio should take care of it automatically but check again)
this is the only method that changed the project name from the base for me.
This did the trick for me:
Close android studio
Change project root directory name
Open android studio
Open the project(not from local history but by browsing to it) Clean
project
Check this:
https://stackoverflow.com/a/28324892/4161284
Perform the following Steps:
Step 1 - Rename:
Step 2 - Update app name in String file:
What helps for me is:
Close Android Studio
Go to projects folder i.e. where the projects are saved (Documents)
Rename the desired folder to whatever you want (keep naming conventions)
Open renamed project in Android Studio and clean project
Open app -> java -> right click package name folder containing activity -> select rename and follow prompts
Project should be renamed.
Note: There might be a .iml file with the old name. It can be renamed if you want the project to be completely clean.
Below strategy worked for me:
Close Android Studio
Change Android Project root directory name
Open Android Studio
Open the project from Android Studio (Try not to open the project from android studio history but by browsing it)
If settings.gradle contains the below line, change it to the new project name or remove it
rootProject.name = 'Your project name'
Clean the project and Build it
thanks
I've updated Android 5.0.1 (API21). When I create project with Android 5.0.1. It's Ok.
But if I create Android with older API then the project will get errors.
Support library "appcompat_v7" will get Error "No resource found"
I found a solution in stackoverflow, change the API of appcompat_v7 to 5.0.1. But when i change, my project will get errors. Class R didn't create when i created project.
I'm newbie. Please help me. How can i resolve these errors.
The result after Ctrl+Shift+O
Perform the following steps :
Right click on your Project root -> Go to Android Tools -> Add Support Library -> A dialog would popup, Accept License -> Click Install
Do the same for your appcompat_v7 Library
OR
Just copy and paste the support library from your project libs directory to appcompat_v7 libs directory to avoid support library signature mismatch.
Hope this Helps!
Being new to Android developent I followed the simplest of tutorials, built a new android project, accepting all default settings (built it for kitkat). To my dismay I have an un-planned project - appcompat_v7, along with the errors:
The container 'Android Dependencies' references non existing library
'C:\Users...\workspace\appcompat_v7\bin\appcompat_v7.jar'
and twice the following
The project cannot be built until build path errors are resolved
Is there a quick way to fix these?
Is this a sign of how difficult, and bugged with unpleasant surprises learning Android is going to be?
(Hope it will not be similar to learning IOS 6 years ago...)
The appcompat_v7 library is added by default to an Android project. You will most likely need it for any demo projects you start making.
To correctly add this library, follow these steps:
For Android Studio:
1. Ensure that you have the Android Support Repository installed in your SDK Manager:
2. In your build.gradle file, include the following implementation statement
implementation 'com.android.support:appcompat-v7:+'
within the dependency bracket.
3. Perform a Gradle sync with the Sync Project button.
~LEGACY ANSWER~:
For Eclipse:
The trick is, you need to clean & build the appcompat_v7 project. Go to
Project -> select Clean -> select the project.
After doing this, if the project does not get built automatically, right click on the project in the package explorer and select Build Project. Now the .jar file will be generated in the project's bin folder. After that, clean & build all projects that reference appcompat_v7.
Now the library should be correctly referenced by all projects that need it.
Note also that:
You must have the latest versions of SDK Tools / Build Tools
/ Platform Tools. If you try this and it doesn't work, then go to
the Android SDK Manager and make sure you have the latest versions of
the required tools.
In case your project only requires API level 14 (Ice Cream Sandwich)
& above, select API level 14 for "minimum required SDK" in the
project wizard when you create a new project. Now the appcompat_v7
library will not be required for this project, and the application
will use the native ActionBar class which is present in AOSP builds
from ICS onwards.
Further References:
1. How to add Android Support v7 libraries in eclipse.
2. Android actionbar how to add supporting library v7 appcompat for Eclipse.
3. android-support-v7-appcompat library project won't work.
4. Difference between android-support-v7-appcompat and android-support-v4.
The accepted answer worked for me but only after I'd installed the latest Java JDK (which was a solution to the problem detailed here Android - "Parsing Data for android-21 failed")
Need to update your SDK manager
click ur sdk manager icon in the ecilipse then update android support Repository in the extras
then
go to File->import->existing project
abt bundle->sdk->extra->android->support->v7 to workspace
after import v7 to workspace go to lib folder choose both jar and right click and choose build to workspace then again right click v7 project go to java build path choose the checkbox and click apply and ok..
if u have updated sdk then follow this steps
step 1:
Right click ur project then go to
property->choose java build path
step 2:
click Add External jar
Step 3:
Browse to ur adt bundle go to ur workspace choose the folder
android-support-v7-appcompat -> lib -> appcompat_v7.jar
Appcompat_7 error solved!
Hi, im a complete beginner, i solved my problem by go to SDK manager update/install all the new android sdk build tools (as im not sure which is which i should update/install so i update/install all the build tools. after updated/installed all the new build tools i closed my eclipse and relaunch the eclipse again. if you see any error again? go to the top bar click PROJECT and choose CLEAN. and run your application again and i think it will work fine..
it worked for me when i changed project build tarjet to API 21 for the android_support_v7_appcompact project
I had the same problem and I tried all of mentionded above advices and much more from, but no one helped me to solve my issue. My solution was creating a progect with minimum required SDK API 14: Android 4.0 (IceCreamSandwich). Doing this way Eclipse will not create appcompat_v7 project.
Also I found another, better, solution:
Go to Android SDK Manager and install Android 5.0.1 (API 21) or newer. If you don't use the emulator you can install only SDK Platform and Google APIs;
Go to appcompat_v7 -> Properties -> Android and check Android 5.0.1 in the Project Build Target;
Then go to Java Build Path -> Order and Export and check Android 5.0.1;
Do the same procedure for your project.
Strange fix but this worked for me ( My minimum SDK for my project is 10 - can't use 14)
Right-click on the "appcompat_v7" project and go to
-> Properties -> Android.
Your target build should already be set at the latest build (in my case Android 5.0.1). Click any other android package (apart from its current target) and click "Apply". Click "Ok" to close the box.
Re-open the Properties box by the same method but this time check the latest build (in my case Android 5.0.1) as the Project Build Target. Click "Apply", then "Ok" to close the box.
Clean the appcompat_v7 project. You'll probably need to clean/build all other projects that reference this library.
This solved it for me.
I was having with same Issue and fed up but finally I got the answer . I resolved this by Copy appcompat library E:\adt-bundle-windows-x86_64-20140702\sdk\extras\android\support\v7\appcompat and paste appcompat Library in the the Project which I want to Import . I close the Eclipse and reopen. But One thing I want to consider before these stuff I updated Android Support Repository and Android Support Library as well.
I solved it by downloading the file manually somewhere on the internet (be careful) and putting it into the needed \appcompat_v7\bin\ folder before creating a new Android project. After that, also my R.java file was generated successfully.
Honestly, no other way seemed to fix it. Could not obtain the file via the SDK manager.
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've installed the Facebook API for Android in Eclipse, and imported the project into my Android project. My program builds perfectly fine, but when I try to run it I get
Could not find com_facebook_android.apk!
in the build window, and when the program actually tries to import any of the Facebook API classes it blows up with a java.lang.NoClassDefFoundError: com.facebook.android.Facebook
Probably you added the reference to the Java project in the "Java Build Path" but it's the wrong place.
From the Android guide:
To add a reference to a library project, follow these steps:
In the Package Explorer, right-click the dependent project and select Properties.
In the Properties window, select the "Android" properties group at left and locate the Library properties at right.
Click Add to open the Project Selection dialog.
From the list of available library projects, select a project and click OK.
When the dialog closes, click Apply in the Properties window.
Click OK to close the Properties window
This resolved my problem.
Check out referencing libraries instructions here:
http://developer.android.com/guide/developing/projects/projects-eclipse.html
Make sure you have the latest versions of ADT.
Try to clean your project in eclipse.
Hope this helps
In my case helped, not to have in the referenced projects checked Is Library
(Project Properties > Android)
I am also having issues with this error and have noted that if I run eclipse as root then the error disappears. This makes me think it is a permissions issue
So to help:
On the com Facebook android project right click > android tool > build and export
Then simply build the project into the bin folder of the Facebook project.
Problem solved
I had a similar problem. This was my resolution. I had to add android.jar as a reference.
Android samples error
If nothing works, try deleting the Facebook application for Android (if you have one installed on your phone). This worked for me.