what is packaged_resources? - android

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.

Related

How to resolve issue with my Gradle file in Android Studio?

After reinstalling my Android Studio I have big issues because all my projects have problem with Gradle file.
There are .jpeg-s attached
Gradle File
Messages Gradle Sync
[Some conflicts in installation area][3]
I would suggest fresh new install of everything and keep in mind where exactly will you install it (my suggestion would be to keep it simple like C:\Android\ for studio and C:\Android\SDK for SDK
Also you can click on Edit next to the SDK location and see what if your SDK report any issues or you can select another SDK location and update missing tools from there.
Or if you would like to tackle current issue on another way, use search and find SDK folder and move it your android folder (don't forget to avoid black space in file path), and again through SDK location don't forget to put new path to the Studio.
After you set up your environment ans run your build gradle again there shouldn't be any more issues like this, or at least when you install missing platforms and tools it will fix thing as it should.
Also have the same dependency version for libraries when you finish setting up environment.
Finally done. I resolved uninstalling Android Studio. The real problem was SDK. When you uninstalling AS SDK is still on computer, and I deleted all these files from SDK folder. The best option if you install AS and SDK directly on C:. After that AS working without any problems. Thanks #Miroslav for all your help and patience.

ADT 22.2 New App Wizard: Unsupported template dependency: Upgrade your Android Eclipse plugin

I found some answers to that issue but none worked for me. When getting the last screen in a new project creation, I'm getting the next message:
Unsupported template dependency: Upgrade your Android Eclipse plugin
The required version is empty (in some cases appears as 8). The installed version is 18.
I already tried many of the solutions I found here, like:
Run the SDK manager as administrator
Run Eclipse as administrator
Re-install the support components from the SDK extra folder and then restart Eclipse,
None of these didn't work for me.
Is there another solution?
Update 2: Now (2013-09-19T17:00:00Z) there's an ADT 22.2.1 and Tools 22.2.1 updates available that fix this issue:
Use Eclipse > Help > Check for Updates to get ADT 22.2.1
Use SDK Manager to get Tools 22.2.1
You need both parts to fix the issue. The ADT bundle and the installer package on http://developer.android.com/sdk/index.html have been updated too.
(From here)
Update: The bug report now has a response with fixed template files attached and the following comments:
This one is my bad. I was in the middle of changing the dependency system used by the templates and a transient state got picked up into this tools build. The templates have settled in the AOSP master branch.
I've attached a snapshot of the current Activities templates. Replacing your sdk/tools/templates/activities folder with the contents of this zip should resolve this issue.
I apologize for the inconvenience.
My older workaround below.
Workaround to the bug:
For Blank Activity:
Edit <sdk>/tools/templates/activities/BlankActivity/template.xml
Comment out the dependency:
<!--<dependency name="appcompat" version="v7" />-->
For Master/Detail Flow:
Edit <sdk>/tools/templates/activities/MasterDetailFlow/template.xml
Comment out the dependencies:
<!--<dependency name="support" version="v4" />
<dependency name="android-support-v4" revision="8" />-->
Finally:
Restart Eclipse
If needed, copy android-support-v4.jar from <sdk>/extras/support/v4 to your libs.
#Šantić A. Miroslav - I'm not sure why, but deleting the SDK tools does not downgrade to the previous version. The folder <sdk>/tools just disappeared and a path not found error occurred.
I tried to download from http://dl-ssl.google.com/android/repository/tools_r22-windows.zip, unzip it and replace it with the <sdk>/tools folder to downgrade the SDK tools, and it worked for me.
I have the same issue. It happen when I upgraded the Android SDK Tools to Rev. 22.2. Downgrading to a older version will get rid of the problem.
I was facing same problem the last couple of hours, and I resolved it... I downloaded the SDK (for my Mac) from the link below.
[For Mac]
http://dl-ssl.google.com/android/repository/tools_r22-macosx.zip
[For Windows]
http://dl-ssl.google.com/android/repository/tools_r22-windows.zip
[For Linux]
http://dl-ssl.google.com/android/repository/tools_r22-linux.zip
I went to Android installed directory --> tool and replaced all the content with the downloaded files.
I restarted Eclipse, executed New Project, and it's working fine!
Please try my workaround:
Create a new project using command line
Notes: DO NOT create it in Eclipse's workspace, create it elsewhere e.g. ~/tmp/
e.g. android create project --target 1 --name MyAndroidApp --path ./MyAndroidAppProject --activity MyAndroidAppActivity --package com.example.myandroid
Then in Eclipse, "Import" the project you've just created
Working solution
I downloaded the adt-bundle-windows-x86_64-20130729 from http://burnbit.com/torrent/251451/adt_bundle_windows_x86_64_20130729_zip. After I updated, I also got the same error as you got. Without updating, I created the project, so now it's running. So do this step. This error is coming because of a version mismatch. So do this step.
Hopefully this will solve your problem.
There is a bug in the latest SDK version. Please downgrade to r_22. It works for me.
You need to update your ADT plugin for it.The latest version of an Android SDK tool is 22.2.1 and for that you need ADT bundle 22.2.1.
Download link for it is
http://www.softpedia.com/get/Programming/Components-Libraries/Android-Development-Tools.shtml

Eclipse stop generating R.java

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.

Android ADT version 22, R.java files not generated

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.

Eclipse Upgrade Not Working

My Eclipse out of the blue stopped building my Android so I removed the old version and have installed Indigo. When I try to import an Android project in I get this error:
Errors occurred during the build.
Errors running builder 'Android Resource Manager' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Android Pre Compiler' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Errors running builder 'Java Builder' on project 'ACCUWX_HoneyComb'.
java.lang.NullPointerException
Please help!
Try removing the .metadata folder from your workspace. This holds all your configurations, even after a new install. I think if you just delete this folder, assuming everything is in place, you should be up and running again.
The 21.0.1 version of the Eclipse ADT tools has a bug that prevents a project building if you have any files without extensions in them. This is a particular problem for users (like me) using subversion which has extenion-less files.
The solution is to install the 21.1 preview version of the ADT tools and SDK manager from Google. Clear instructions can be found here and you can read all the background add your voice to the angry mob of developers here.
This happened to me today with ADT v21.0.1-543035 and it turned out to be the .svn directories throughout the directory structure. See http://code.google.com/p/android/issues/detail?id=42051
Worked around the issue by upgrading svn client and working copy to 1.7.
For me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. It's not an Android project, but for some reason the newer version of the SDK somehow expects the file there. To fix the problem, I just copied a project.properties file from an Android project to the host unit test project.
I had something similar. The problem was created by having some files without extension inside the /src folder.
In my case, a branch tool, changed the encode of the file project.properties, I changed the encode to Windows-1265 and the problem was solved.
I had the same issue and fixed it by following comment number 6 in this page:
Issue 42051: Subversion folder causes NPE in PreCompilerBuilder
Let me quote the comment:
Solved it by installing subversion support packages for eclipse:
http://gan.so/VgYT
It's still a bug but...
same problem here, I closed Eclipse, manually removed any files in folder gen for the project, started Eclipse again, and made a build.
For also me, the source of the NullPointerException problem was a host-side Junit test project that references (and tests) code from an Android project. It didn't have a project.properties file. I added it and problem got fixed.
I found the solution on this website(https://code.google.com/p/android/issues/detail?id=68755)
So basically, what we should do is :
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
you can find the eclipse.ini following this
(On a Mac OS X system, you can find eclipse.ini by right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate eclipse.ini in the MacOS folder under Contents)
Upgrades did not work for me (on Linux), so I just installed IntelliJ Idea (build 123.155). Had to modify idea.sh to set JDK_HOME=/usr/lib/jvm/jdk1.7.0 (the Oracle JDK) and to select [menu] -- Run -- Run... -- Edit Configurations... -- Target Device -- USB device to make it work with the real device.

Categories

Resources