I have tried so far every solution; clean, change the namespace etc. I still cannot get this resolved.
I have created an Android project with API 19 and it creates another project alongside mine called appcompat_7. This project has quite a few erros and one of them is " article_view cannot be resolved or is not a field ".
The following files have the errors;
ArticleFragment.java
HeadlinesFragment.java
MainActivity.java
All of these files seem to have issues with R.layout.*
I am not sure what would resolve this issue at this point as this is completely new project and I have tried almost every API above 17 and each project has definitely an error that does not get resolved with clean etc. I am using Eclipse Luna and I am sure I was able to install the correct SDK.
As a note: Am I the only one who thinks this IDE for Android is somewhat messy and not friendly at all?
Thank you for any insight.
Edit:
I solved the problem by trying API 18 for both compiler and target. It did not create the appcompat_v7 project so I just fixed the dependencies and changed the namespaces. I still think Eclipse is not working well with Android plugin.
I was also stuck with the same issue few day ago,
I resolved the same issue by updating sdk to latest version 23.0.4. and extras: Android support Repository to rev. 6 Android support Library to rev. 20
first of all open up your Android sdk Manager from eclipse and download all latest sdk updates and extra downloads.
And then after downloading all updates , you have need to use a fresh Eclips editor because your existing eclipse will not let you successfully update from Android sdk tool 20 to 21.0.4 Then just use a fresh eclips editor and set up updated android sdk path in the fresh eclips (the same one you have used in your last eclipse editor , you can find it at Window>> Prefrences >> Android).
Hopefully this will solve your problem.
Related
I am writing my first android application and after constructing two basic views in IntelliJ 11 I was advised to switch to 12 for the visual Designer tool.
I have loaded the existing project into IntelliJ 12 and when I try to run it on an AVD I get the following error
"android-validator: [PanPlan] Incompatible version of Android SDK Tools package. Min version is 19. Please, update it though SDK manager"
When I open the SDK manager however it seems I have the latest Tools package:
The project structure
As per #ekudel's suggestion, attaching contents of /android-sdk-macosx/tools/source.properties
Pkg.UserSrc=false
Pkg.Revision=22.0.5
Platform.MinPlatformToolsRev=18
The workaround I found after days of struggling is far from perfect and I'm willing to accept a different answer should one appear. Hopefully anyone struggling with the same problem will find this useful.
I found no way of importing the old project to work in IntelliJ Idea 12
I had to disable the mac warning for downloaded applications for the android-sdk-macosx folder. (Using this guide.)
I had to manually copy/paste code and resources from the old project.
This only worked if I selected the 4.2.2 as the platform, selecting 4.0.3 led to the same
""android-validator: [PanPlan] Incompatible version of Android SDK Tools package. Min version is 19. Please, update it though SDK manager" error.
I am having a problem creating my first Android App.
I installed JDK 7u21.
I downloaded and extracted Android SDK Build: v22.0.0-675183.
I started Eclipse and created a new Android Application Project.
When I click Finish I get the following error:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'Steve'.
java.lang.NullPointerException
I have search and couldn't find anyone with the same problem.
Did I install something wrong? Is something missing from the SDK? What can I do to correct this error?
In my case I switch from Android SDK 64 bits, to Android SDK 32 bits. Now it's working perfectly.
Have the same problem after updating SDK to 22. For me, it seems to be a backward compatibility fail by Android vs. Eclipse (on my side additional with Maven).
See also: Eclipse Upgrade Not Working
So not your fault. Try f.e. IntelliJ for the moment. There is also a specialised version, called Android Studio but this is not that stable as the original.
The Android guys also deliver a complete package for Eclipse + ADT-Plugin, but not sure, whether this solves the problem.
I've run into the same problem. Every new project, imported or otherwise throws that exception.
It appears to be a bug with Eclipse, and the simplest fix for me was to re-extract the ADT bundle, and replace only the eclipse directory. It'll take forever to download the SDKs if you replace the SDK directory too.
ADT bundle does not work with the Oracle Java 7 SE JDK, failing with an NPE in the Android Application Project wizard.
Installing the Eclipse Plugin
Here's a workaround that lets you keep Java 7 as the default but run ADT with Java 6 when you have both installed. Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor. Before the -vmargs line, insert these two lines:
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
or any place your java is installed, for example on my computer:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
Android issue tracker - answer
This works for me:
For those who experience the same problem, here is how i fixed it: After a couple of try and errors, I found out the problem was about creating an activity in the create project wizard. If you simply deselect the create activity button at the 2nd step of the wizard, it creates the project succesfully. Then you can add an activity to your project easily.
Source:
https://code.google.com/p/android/issues/detail?id=68755
I am a newbie to android programming .I was doing tutorial from Commsware tutorial , to be precise T3 tutorial during which I cleaned the project.After that R class file has stopped generating.
I deleted that project,looks like the same error is getting propagated to other new projects I am creating.
This error is coming for the newly created project also.
I tried all the solutions in stackoverflow like : cleaning project,selecting android version in build path , deleting my workspace,freshly install eclipse etc..
The other intimidating thing is my res folder does not show any errors and my xml file does not contain any capital letters.
It must be some silly error which is causing this?
Perhaps you should take a look at this if you've recently updated SDK tools.
After updating to SDK Tools to rev. 22 for the first time, you may need to relaunch Android SDK Manager again and install a new item: Android SDK Build-tools.
After installing this, clean your projects and rebuild.
this happened to me after updating the android dev kit and esclipse.
couple of things you should try.
if you updated ADT, you must restart ADB server. you probably haven't read the message that says after update. or maybe restart whole pc.
if you're using external jar files, rename the libs folder to lib and revert it back to libs (from eclipse, f2)
There seems to be a problem with the target build settings within your projects.
The R file will not be autogenerated if there is the slightest error in your project. E.g if you use elements in a layout xml file that are available only in Android 2.2 but your project targets android 2.0. Sometimes the offending elements don't show up as errors because, syntax-wise, they are correct.
I advice you look at your target builds in android manifest.
Or target a higher android build (Get the latest one via SDK manager)
I am a new Android developer (4 weeks into porting my iPhone app to Android). I have 8 projects (the app, and 6 small UI experiments, and a vanilla Hello World project that I just created with Eclipse). All fail to compile, and the issue is that every reference to the generated file R is flagged as "R cannot be resolved to a variable".
Up until yesterday afternoon -- every project compiled and ran (albeit very slowly) in the Android emulator. I've changed something, and since yesterday, all projects fail to compile, all in the exact same manner "R cannot be resolved to a variable". I every case, the generated files are missing. I believe they disappeared as I tried to clean and rebuild each project in the course of debugging this problem.
Two things that I know changed when this problem started, but that I can't say caused the problem, were: 1) shifting to debugging on a real Android device (a Samsung Galaxy Tab 2, which worked like a champ after struggling with the slow emulators), and 2) allowing Android (and perhaps Eclipse) to update themselves from the web.
I've spent many hours trying other user's suggestions and none have helped. Most suggestions refer to file naming issues, xml syntax errors, but I haven't changed these files and filenames since compilation was working. I have tried:
cleaning and rebuilding the projects
checking for subsequent updates to the Android SDK (and there were 2 subsequent ones)
Eclipse->File->Android Tools->Fix Project Properties
making small source changes to force rebuilding
rebooting Eclipse, as well as the Mac host, adb, the emulator, the Android SDK Manager
deleting a project, restarting Eclipse, and adding the project back in (bad idea - this fails with an error "Failed to load properties file for project 'ListViewFragmentTest'"
creating a brand new Android App project, which has worked many times before, but now fails
There's something going systematically wrong, and while I won't claim all these projects are bug-free, they did run up until 6pm yesterday, and then all stopped compiling thereafter.
I wonder if anyone has other suggestions, before I embarking with a complete reinstall of the development environment?
My environment is:
Macbook Pro (OS X 10.7.5, 8GB RAM, 2.53GHx Core i5)
Eclipse (Indigo Service Release 2, Build: 20120216-1857) (too old?)
Android SDK Manager Rev 22
Android SDK Tools (22), Platform Tools (17), Build Tools (17)
API's 11-17, all up-to-date
Seems like lots of people experience trouble with missing generated files (R), and I have had trouble when I've had layout XML errors as well, but that doesn't seem to be causing this problem. Thanks in advance for your help!
I am not sure but you are facing issue of R.java file is not getting generated after updated with ADT rev 22.
If this is the case then here is the solution:
Hope you know Android studio has gradle building tool. Same as in eclipse they have given new component in the Tools folder called Android SDK Build-tools that needs to be installed. Open the Android SDK Manager, select the newly added build tools, install it, restart the SDK Manager after the update.
Check in the Java build path library, whether "src" check box is checked or not.
If you are using any additional Libraries then make sure libs/android-support-v4.jar is same for project as well as the Libraries.
Thanks everyone. None of these suggestions resolved my problem. And while I'm curious as to why it happened, I was more impatient with not making any progress. I've reloaded Eclipse and the Android tools (this time with the bundled version from developer.android.com), and everything is working smoothly again.
I recently downloaded all the latest updates for my eclipse/Android plugins (before the upgrades everything worked fine). I got everything to work except when i try to create a new project I get a message that I need Android support library revision 8. I click Install/Upgrade and It proceeds to download and install the library. When it finishes the tiny download/install window disappears but the window which informs me that i need Android support library revision 8 remains open and i cant click finish to create new project. I tried closing the window and eclipse and trying it again but it always leads me to the window which states I need the Android support library revision 8. I didnt move eclipse to any other location and I am wondering what is wrong.
I had a problem before with an ! in my eclipse path and eclipse wouldnt work because of exit error 13. I posted a question about it before. My answer explains what has happened and the easy fix.
I am wondering what is wrong now. Do i need to manually link the support library?
Im really frustrated because its taking me forever to set this up.
Update:
I tried restarting eclipse and reinstalling the library multiple times.
I upgraded the android sdk tools and sdk platform-tools before i installed the support libraries.
Like these similar issue i'd for 2 days ago. Whenever, i'm trying to create a new project its showing me like below
For, this i've downloaded that support library using Install/Upgrade and in my path E:/Android/Android-Sdk/extras/android/compaitability I've changed the name of compaitability as support and after just restarted my Eclipse. Its working fine.
Hope these helps you.
Try updating android sdk tools and sdk platform-tools and restart eclipse? ADT has dependencies on these.