I have Eclipse Luna installed on my Mac and yesterday night I downloaded from the sdk manager the latest android sdk (v. 21 Android 5.0). Unfortunately after the update I got several errors that I tried to solve following the instructions in several posts here in Stack Overflow.
1. In java build path under Android Dependencies the jar file for Appcompact 7 was not found under the bin folder. I've read that this was due to the fact that I should have set 21 as the project target for the support library then clear and build the library project so that the jar file would be automatically created under the bin folder, but that didn't happened.
2. I added the jar file of the library under the bin folder manually. At this point instead of having the exclamation mark on the project name I have all the files under src folder marked with errors as the R file is not recognized anymore. I don't have any errors in any xml file, but still R resources are not found in the project.
3. Every time I try to change the target sdk for my project to 21 or 21 with google apis I get an error stating "Parsing Data for Google Inc.:Google APIs:21 failed Unsupported major.minor version 51.0". I've read that probably this is due to the jdk version installed on the computer so I updated it to the version 8 and changed the compiler in Eclipse to the 1.8 version. That didn't solve the problem so I got it back to 1.6.
4. In the problems tab I have the following errors:
- The import com.google.android.gms cannot be resolved;
- R cannot be resolved to a variable;
- the method initializePoolObject() of type DBObjectStructure must override a superclass method.
Do you have any idea of how to get to work again wthout any problems?
The import com.google.android.gms cannot be resolved
com.google.android.gms comes from the Play Services SDK, which you attach to your application project as an Android library
project. Please check your environment to ensure that you have a
valid copy of the Play Services library project and that your
application project still points to it.
Install a new Play Services:
Follow the instruction from Google to install
'google-play-services-lib' project.
This is the documentation.
R cannot be resolved to a variable
Make sure that your compiling and target versions are set to
21. Its because the new AppCompat only compiles on 21.
Right click the project and click "Properties". Then select "Android" from the tree on the left. You can then select the target target version on the right.
Note: Make sure your properties, classpath and project files are writable otherwise it won't work
The method initializePoolObject() of type DBObjectStructure must override a superclass method.
You have to update your jdk version into 1.8 to overcome this
error.Also change the java compiling version of your project into 1.8
in eclipse.
When creating a new project for Lollipop, Android Studio warned that java 7 is required. I know java 8 is not yet supported in Android, so that won't work, but I suggest you go with the latest update of java 7, perhaps the issue in Eclipse is the same, just the warning is missing.
to fix the R not identified error migrate to android studio. Version .8 should be sufficient evidence that the beta version is of release quality.
For eclipse delete the import myapp.R and then re-add them this has worked for me in the past.
Try use other IDE like Andorid Studio or InteliJ IDE, maximum resolves your error.
Related
I am trying to solve this problem for a few days now. Whenever I import ARCore SDK, to Unity, I cannot compile my project.
The error I am facing now is:
Minimum supported Gradle version is 5.6.4. Current Version is 5.1.1. If using the gradle wrapper, try editing the distributionUrl.
I did so, I saw in my eyes a new version is imported but I am keep getting this error.
Here are some other things I tried:
Trying to import the SDK to multiple versions of Unity.
Using a different computer.
Not changing the minimum API Level to 24.
Building the app without scenes.
trying to use different Gradle versions besides 5.6.4. In particular, 6.7, 6.1.1
Creating a system variable under Path: C:\Gradle\gradle-6.7\bin
Removing 5.1.1 folder from the Temp folder of the project, whenever I compile it (Although it keeps appearing of course)
Following the guide found at:
https://developers.google.com/ar/develop/unity/quickstart-android
Ensuring JDK, JVM and all required components are installed.
All to no avail. The project is not compiling.
Any help would be greatly appreciated!
EDIT:
I believe the root of the problem is that I haven't changed the Gradle version somewhere, despite doing so at the wrapper. The reason I stuck at 5.1.1 has something to do with the default Gradle version of my Unity version.
https://docs.unity3d.com/Manual/android-gradle-overview.html
Question is, how to solve it.
I can think about two ways to solve it (but they are pretty similar):
First Option:
Download the gradle version you want, navigate to where Unity's gradle is located in:
C:/{UnityEditorsDirectory}/{UnityVersionDirectory}/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/gradle
Then replace lib folder with your new gradle lib folder.
Second Option:
In case this doesn't work, you can also try to:
Open Unity Editor, go to the menu tab Edit->Preferences->External Tools
Scroll down and find this toggle:
If you uncheck the toggle, the editor will allow you to browse where your gradle is located, paste your new directory and try if it works.
TAKE CARE: Unity's gradle version is the one that Unity's people have tested so...something can explode unexpectedly!
while re-importing my project android studio show's plenty of errors
after cleaning and re-importing my project i have got an red circle with āJā on my java files and i'am enable to run my project
Make sure that your gradle version is defined properly.
It seems that this project was on another PC and you imported it on your computer. I think that probably a gradle version conflict occurred and you have two options:
one is to let android studio download gradle version specified in TlaProject (gradle 2.4)
another solution is to edit app level 'build.gradle' file and change its version to a version which is available on your machine (to see which version is available on your system, please check 'gradle' folder inside installation folder of android studio)
My problem was solved by updating the version of android studio .
I installed android adt with eclipse and appcompat v7 is showing error I tried almost everything i.e
1.change the build path
2.re installing the whole package
3.include the jar files manually
4.Updating the eclipse
Please check for the error in picture.
Please help me its two days I am struggling.
You have installed the higher version of jdk. just follow the below steps.
right click on project properties > click on java compiler, enable project specific settings and change the java version to 1.4 or lower.
If anyone getting the same problem delete appcompat_v4 from the libs folder when creating a new project
I imported the Facebook SDK as library project into eclipse. I did it by checking Copy projects into Workspace and by leaving it unchecked as well (for some reason the description says that I must uncheck it).
I tried importing Existing Projects into Workspace and Existing Android Code Into Workspace as well.
The library checkbox is checked in the properties.
A Facebook sdk has never been imported into this workspace yet.
I created a new project that runs smoothly without Facebook. In the properties, Android tab, I added the library project. It showed a green tick, but when I open that tab again, it shows a red x.
The target of the project is API level 19, the target of the facebook library is API level 8. I also tried it with API level 10
I am using Java compiler 1.6 in both the project and the library.
What I don't understand is that the sample projects that came with the SDK seem to have successfully imported the SDK (green tick), however they all point to the same problem "The import android.support cannot be resolved" on import android.support.v4.app.FragmentActivity; I had to hover over the line and click Fix Project setup to make them work. Then I went to Properties -> Java Build Path -> Order and Export -> clicked v4 support library checkbox. So at least they work. Why do they successfully load the Facebook SDK and why is my app unable to do it?
The Facebook SDK has no libs folder so I guess an interference between different v4 support libraries is out of the question.
I have tried this on two different computers as well.
I decided to install Android from step to step instead of the ADT Bundle. I downloaded Eclipse Juno for Java Developers, installed the newest Java version (1.8) and installed the Android packages. Created a new project and imported the facebook sdk 3.5 (tried 3.0.2 and 3.8 as well). I still get the red X.
I appreciate any help.
I ran into this issue half a year later and my earlier answer was of no help. The trick is that you need to have the library on the same drive as your project, which is usually the C: drive. That's all. Thank you Facebook for not notifying us about this..
Solved. Here is what I did to solve this strange error.
Copy the contents of project.properties file.
Delete project.properties file.
Create a new file and name it project.properties
Paste the contents of the previous file into this new file.
I grabbed a fresh copy of the eclipse ADT bundle today and now when I make a new app project the R folder fails to generate (As well as anything else in the gen folder. I also am unable to download API level 18 (Android 4.3).
Did anyone else run into this and if so how did you fix it / or is it something in regards to the switch from eclipse to android studio?
Check first
properties > Android
if any android version is checked
If ok
Then
properties > Java Build Path
check for added dependencies have correct path (Most probably not applied in your case)
If every thing is Ok then Resart Eclipse
Reconfigure your SDK path
Window >> Preferences > Android browse SDK directory
When I upgraded to Android ADT rev 22 I got to check Android Private Libraries in the tab Order & Export of the Java Build Path configuration screen. But I suppose it only apply if you depend on libraries. See this question for details.