When I am trying to run my Android application in Eclipse I am getting "Could not find **.apk!" error. Till today my application was running without any problem. Not able to find out why this error is coming.
Any help is appreciated.
Rohan.
Please follow these steps; this might help you out:
Go to Project->Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
if its not work try this-
deleting the R.Java file in /Gen folder and then clean your project.
Do you have the Android SDK Build-tools installed?
I encountered the same problem, after upgrading the Eclipse adt plugin to v 22.0.1. I did not had the build-tools installed before, but upgrading the SDK tools and installing the build tool fixed it for me.
Related
I'm newly configured Android Eclipse neon in Ubuntu. When I try to open the eclipse it throws error As
"Failed to get the required ADT version number from the SDK. The Android Development Toolkit may not work properly"
I have tried many references but i am unable to solve the issue as given in references to reinstall ADT plugin.Which i have tried many times and does not solve the issue.
The Message shown in dialog box
Finally i got an answer.
You first restart your eclipse and check it.
If again throws same error please try this steps:
1. Download latest SDK tools package package from google.Download here end of the page.
2. Extract the tools package.
3. Replace Exract folder(ToolsPackage) to ANDROID_SDK_DIRECTORY/tools folder.
4. Now fixed the issue. works fine for me.
What I did was download the SDK TOOLS folder from the url:
https://androidsdkmanager.azurewebsites.net/SDKTools (Android SDK Tools 26.0.2)
then find the path where the SDK is installed
MAC OS: open //Library/Android/sdk/
and overwrite folder tools
I am new to Xamarin for visual studio , when I tried to build the auto generated app from visual studio 2015 without any editing it just did not build and those errors occurred :
*Severity Code Description Project File Line Suppression State Error The file "obj\Debug\android\bin\packaged_resources" does not exist. App1
*Severity Code Description Project File Line Suppression State
Error "aapt.exe" exited with code -1073741819. App1
I tried many solutions from those who had the same problem but I can't seem to find any solution that actally works for me.
One additional detail that is not mentioned but might be a part of the problem is that the resource files can only contain 'a'-'Z', '0'-'9' and '_' characters. A single resource file can ruin the whole build, which is exactly what happened to me. I suggest to anyone running into this mistake to double check the file names of resources.
Same problem with me. It seems it´s a bug.
Lots of posts out there:
https://forums.xamarin.com/discussion/65862/i-cant-build-any-android-project
At this one I´ve seen a light and worked for me:
https://bugzilla.xamarin.com/show_bug.cgi?id=39910
In short:
Close VS
DEL your folder C:\users\\appdata\local\xamarin
DEL your project sub-folders BIN and OBJ at Droid and IOS
Use Nuget to update your projects packages
Update Android Studio SDK if neccessary
Reopen VS and rebuild your solution.
I hope you have same luck... It was really annoying...
Please let us know. Bye.
Ran into the same problem. After toiling on it for a while, I finally found a viable solution. Apparently, this is like caused by a bug in Android Build Tools 24.0.0. And removing those from the system should solve the problem. A bug has been reported, you can find more details on the link below:
https://releases.xamarin.com/technical-bulletin-android-sdk-build-tools-24/
Installing an older "Android SDK build tools" Version was the solution for me.
Start the SDK Manager (in VS 15):
Tools -> Android -> Android SDK Manager ..
Install "Android SDK Build-tools" version 23.0.1
Uninstall all other "Android SDK Build-tools" versions
Build -> rebuild the project / workspace
(Even safer: run a clean, restart VS, run build)
This was successful with:
Android SDK Tools 25.2.3
Android SDK Platform Tools 25.0.1
Android SDK build tools version 23.0.1
If that works, you can test newer build tools.
Today, I update ADT to 22.0.1.v201305230001--685705, and found that Eclipse stopped generating R.java. I believed that it is problem of Eclipse, because I create a whole new clean android project, and I cannot even run it as android application. I cannot find any files under gen folder.
The version of Eclipse is 4.2.2, is there any way to solve it?
I try to use Eclipse 4.3 with the latest version ADT, but the problem is still there.
I had the same problem.
Open up the android SDK Manager, and install the new android build tools. Without this you will no longer be able to build anything.
For some reason they have seperated them, and a lot of people are not noticing.
Try deleting bin folder and clean the project..and In Eclipse, under the Project menu, is an option build automatically. That would help you build the R.java file everytime modifications are made. The Clean... option is also there under Project It seems to be a common issue with many different answers
Update android-sdk, I think sdk need Android SDK Build-tools. For update it follow some steps--
Go to Window->Android SDK Manager.
Update and Install all tools (Android SDK Tools, Android SDK Platform-tools,Android SDK Build-tools) which are in Tools folder.
Check the xml files of your layout whether they are properly saved with no error or not.
I have faced similar problem that suddenly R.java is disappeared and eclipse could not regenerate it after building SDK. I checked SDK manager and saw that Android SDK build tool is perfectly installed. Finally, I have noticed that there are some errors in xml files. After fixing and saving those, R.java generated automatically in my case.
After upgrading to Android ADT version 22 and cleaning my project, the R.java files went missing. I can't use setViewContent(R.layout.activity_main) because the activity cannot reference to the xml layout (due to the missing R.java). Also, when using the (ctrl + space) to get suggestions for setContentView, the code is not typed in. Upon looking at the error log, it shows that there was an "Unhandled event loop exception". The plug-in involved is the org.eclipse.ui.
Also, whenever I create a new Hello World project, the gen folder is empty.
After a few hours, I tried the android studio. But I didn't like it there. Then, when I went back to Eclipse, there was an update for SDK platform tools and build tools. I updated them but I still get the errors.
I tried cleaning the project but no luck. What seems to be the problem?
I had the same problem just solved it.
check:Java/Eclipse - No more R file ever
More info:https://groups.google.com/forum/?fromgroups=#!topic/android-developers/rCaeT3qckoE%5B1-25-false%5D
Update Android SDK Tools and Android SDK Platform-tools and Android SDK Build-tools from Android SDK Manager
Add abover dir to your ENV $PATH
Not enough credits (yet :-) ) to vote up or comment directly on Rany A. Ishak's answer, but after one day lost trying to fix these silly problems, I'm very confident I've found the right solution...I'm installing Android SDK Build-tools right now, I'll get back soon on this!
The solution for this is, open "Android SDK Manager". Download "Android SDK build tools". Then for safety, restart your eclipse. That's it. Back to normal. All apps start building.
Android SDK now has a special package: Build Tools. It was not present in earlier SDK versions, and seems like it MUST be installed in order to generate those R files. It is now the one package that does that stuff. (And probably everything else regarding building for Android). So, if you not have that installed (and you will likely not have if you just upgraded the SDK), it's like missing a compiler - you can't ever expect your code to be compiled if there is no compiler.
I had the same exact problem after updating to SDK 22. There seems to be an issue in the Android SDK update process that the process needed to run twice to update the SDK Tools completely. Make sure you check the SDK manager a few times by closing and re-opening the SDK manager (not Eclipse) to load the new updates. Then restart eclipse and check the SDK manager again. Make sure all items are updated. Then clean your projects and R.java will get created again.
In Eclipse, go to Project menu,there is an option build automatically, click it. That would help you build the R.java file everytime modifications are made in your project. The Clean option is also there under Project. It will help you.
I tried the following. Let the application name be "My First Application". Then the name of the package should be com.xx.myfirstapplication.yy. Make sure that you add a yy after the application name in the package field while creating the application. Hope it helps.
The Same problem happened to me also,
1.Check that Android SDK Build-tools is installed. Window->Android SDK Manager->Tools->Android SDK Build-tools
2.Make sure when you update the Android SDK Tools, you also update the Android SDK Platform-tools and Android ASK Build-tools. Build fails silently if they don't match.
Solution
1.Update Android SDK Tools and Android SDK Platform-tools and Android SDK Build-tools from Android SDK Manager (Window->Android SDK Manager->Tools->Android SDK Build-tools).Then restart the eclipse.
This is.... "Much ado about nothing"!!!
In my case there is error due to "&" inside strings.xml file(but error not shown) for declaring string for a array type. Now the problem has been solved as I changed "&" to "and".
So, please make sure that you do not have such silly use of symbols, and clean the project.
I had the same problem,
I just removed all the errors in my source files and xml files then R.java was generated.
I recently updated Eclipse, and now when I go to create a new project it will display an error that says "The SDK doesn't have the directory tool/progaurd.cfg".
How can I fix this?
Also, after you continue with the error there is no r.java file...
I had the same problem before. Updating the Android SDK Tool fixed it. Here is how: "Window" -> "Android SDK and ADV Manager" -> "Installed packages" -> "Update all...".
I too had this same issue. I had other projects too...But it didnt have this error..When I created a new one, one day it came with this error. My error went I placed this file into that folder.
FIXED IT. All you have to do is, reinstall the update ADT in eclipse. You do this by Help,AVD and SDK Manager,Available packages. Install the latest ones AGAIN even if you have already installed it.
This fixed it for me perfectly. So give it a try!