Eclipse / ADT not updating package when re-running after editing XML - android

So this is probably a dumb question as I'm just dipping my feet into Android App development. Im using Eclipse / ADT build 21.1.0. and am running through the android developer tutorial found at http://developer.android.com/training/basics/firstapp/building-ui.html.
Which, the above link is where I'm hitting an odd snag. Following the instructions, editing the XML, then running the emulator, the app refuses to show the text fields and continues to show Hello World.
I have to assume theres a build function to update the edited XML files, but this is not described in the tutorial, and Ive followed the editing instructions specifically, I cant figure out how to update the R.java file with my new edits (tutorial suggests it does this automatically).
I know I'm making a rookie mistake... But have been unable to find a solution to move forward.
Furthermore, Im getting this on first run:
[2013-02-27 12:36:38 - MyFirstApp] W/ResourceType( 5128): Bad XML block: header size 284 or total size 0 is larger than data size 0
[2013-02-27 12:36:38 - MyFirstApp] C:\Users\jkyle\workspace\MyFirstApp\res\menu\main.xml:3: error: Error: No resource found that matches the given name (at 'title' with value '#string/action_settings').
I run it again, it runs and it says all is well.
Any help is mucho appreciated.

Add an entry like <string name="action_settings">action Settings</string> in strings.xml

Related

(Build failed 'Xcodes output') The getter 'onChanged00' isn't defined for the class 'OTPTextField

I haven't worked on my app for 2 days and all of a sudden, when running the app, I get this error:
debug console
I haven't touched the code and it was working fine 2 days ago.
The links in the error...
otp_field file
otp_field file
...point to the otp_field.dart file(which I never opened), with the error being The getter 'onChanged00' isn't defined for the class 'OTPTextField'.
I'm not sure how this happened and can't seem to solve this. I updated the otp_field entry in the pubspec.yaml file, but this did not work either.
pubspec.yaml file
(This also happens when I run using the android emulator)
What am I missing here? Would be great if you could point me in the right direction. Thanks in advance.

cmd: Command failed with exit code 1, Error : No resource found that matches the given name (at 'icon' with value '#drawable/icon')

So i have found a few questions that start the same, but none of them apply to my exact situation, as such neither do the answers.
i'm using cordova in VS studio 2015 and everything was fine 1 hour ago.
But for some reason the builds fail when deploying to device(or emulator) now, even though i have changed nothing in my code!
(i added 1 small IF statement, that i have since rolled back)
The error i get is :
cmd: Command failed with exit code 1 FriendFinder C:\uni
project\FriendFinder\FriendFinder\FriendFinder\ERROR building one of
the platforms 1
reading full debug log, and finding the first instance of the word "failed" revealed it to be here :
C:\uni
project\FriendFinder\FriendFinder\FriendFinder\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:29:
error: Error: No resource found that matches the given name (at 'icon'
with value '#drawable/icon'). (TaskId:11)
All the fixes i've found say to remove that line, or use a different icon, or something similar. Yet i have never set any icons, nor do i plan to for some time, and the manifest is un-editable(it's re-generated each build by VS)
I'm truly baffled, because i effectively haven't changed anything since it was working fine 1h ago.
Turns out visual studio had deleted the resources from the project, all by itself.
Creating a new blank Cordova app and copying the generated ones across to this project fixed the problem.

System did not generate an Id for my new xml layout and show me same errors

I have 2 problem that I think both of them is for one reason:
When I try to add a new XML layout; that XML fail add successfully but in "Console" show me it:
[2014-05-04 18:41:11 - Example] W/ResourceType( 5804): ResXMLTree_node size 0 is smaller than header size 0x14.
[2014-05-04 18:41:11 - Example] D:\Android\Workspace\Example\res\menu\main.xml:4: error: Error: Resource id cannot be an empty string (at 'actionLayout' with value '#android:layout/').
and I can get resource to it in classes.
In "problem" tab:
Errors: Unparsed aapt error(s)! Check the console for output.
Location: line 1
Type: Android ADT Problem
and I cant solve it
Please same one help me ...
I sorted this out. So for anyone else still on the learning curve with me, the solultion is as noted in my comment. In addition -
aapt = Android Asset Packaging Tool From the Developers Guide - "The Android Asset Packaging Tool (aapt) takes your application resource files, such as the AndroidManifest.xml file and the XML files for your Activities, and compiles them."
The solution for me was simply to delete the error on the 'Problem' window (right click | delete). Then, force a rebuild by rerunning the app. Any remaining problems will now show up and be logged so you can track them down.
Hope this is helpful to others.

Problems using main.xml in Eclipse (Android)

Programming for android is new for me. Therefore, eclipse is also new. I've been trying to create small things. But every example i find i need to edit in the main.xml.
My problem is, whenever i use that file, i'm getting an error. I don't know what causes it. I don't know how to get rid of it.
I've tried to follow guids on youtube. Following it to the point. Still, getting errors.
Does anyone have an idea to what causes this problem? and more important: how to solve it?
[2012-03-26 12:12:40 - No XML] emulator-5554 disconnected! Cancelling 'cyperia.noXML.NoXMLActivity activity launch'!
[2012-03-26 12:12:52 - No XML] Error in an XML file: aborting build.
[2012-03-26 12:13:00 - No XML] res\layout\main.xml:0: error: Resource entry main is already defined.
[2012-03-26 12:13:00 - No XML] res\layout\main.out.xml:0: Originally defined here.
[2012-03-26 12:13:00 - No XML] C:\Users\Illum\workspace\No XML\res\layout\main.out.xml:1: error: Error parsing XML: no element found
[2012-03-26 12:13:01 - No XML] 'default' is not a best match for any device/locale combination.
[2012-03-26 12:13:01 - No XML] Displaying it with 'Locale Language ___Region __, sw320dp, w320dp, h533dp, Normal Screen, Long screen aspect ratio, Portrait Orientation, Normal, Day time, High Density, Finger-based touchscreen, Soft keyboard, No keyboard, Exposed navigation, Trackball navigation, Screen resolution 800x480, API Level 15' which is compatible, but will actually be displayed with another more specific version of the layout.
[2012-03-26 12:13:02 - No XML] Error in an XML file: aborting build.
This is a long standing issue with Android development with Eclipse. You see this message when you run/debug a project with a .xml file opened as "current document". Eclipse tries to build the xml file instead of the project, thus throw the mysterious error.
A quick workaround would be to navigate to a .java file before you run/debug the project.
You can also select the project from workspace to run/debug it, but it'll take more clicks.
I dealt with this issue for weeks on my main machine, and finally got fed up with it. I installed Eclipse/ADT Plugin on another machine and didn't have the same issue. So this made me think of the most simple solution. Remove and reinstall! I ended up downloading Eclipse again on my main machine and reinstalling the ADT Plugin. The problem no longer exists. Note, I did not uninstall the Android SDK. I left that as is and haven't ran into the same issues yet.
TL;DR Download Eclipse and the plugin again and it should fix the issue.

Can't upload APK due to "The file is invalid: ERROR: dump failed because no AndroidManifest.xml found"

First: I'm not help vampire) I'm fighting with this issue for two days and I'm desperate to find solution. I've googled for the solution all over the inet and none is my case - this is the final stage and it feels hopeless.
To be clear: messing with AndroidManifest.xml doesn't help (no empty or unclosed tags etc). Nor app size issue (official limit is 4GB). Nor browser\system cause tried in FF, Chrome, IE 9 , Win 7, MacOSX SL 10.6.4, from my PC and from remote Server with Win2008 - same error.
Second - I extracted the AndroidManifest.xml from the APK file I submitted successfully (one with 13MB size) and extracted AndroidManifest.xml from the APK I'm trying to submit (yes, it's there! the size of this APK is 50MB) both with same apktool v 1.4.1. I compared the AndroidManifest.xml files with tortoise Diff - and the only difference between them is presence of android:targetSdkVersion="8" attribute in unuploadable APK and of course package name (diff only in .sub of com.mycompany.app.vers.sub - so i guess not a reason for this googlemare I'm having on ).
No way to give up on android:targetSdkVersion="8" - cause it can't be a reason for the error too.
Both APK were created with File -> Export -> Android -> Export Android Application with same keystore and key. I uploaded another app - third one with same AndroidManifest.xml as first one (without android:targetSdkVersion="8") but also of small size - 9MB, nothing bigger works((!
Help - I hate google and android now, almost :)
If you ran into the same problem I did with apktool, then please make sure you download the .jar file along with aapt.exe, that fixed it for me. I was running aapt.exe on an apk and got your above error, but it turns out I should have been running the apktool.bat file. The apktool.bat won't work if the .jar is not in the same directory. Get the jar file here: Android-APKTool
The maximum size of an Android app to be uploaded to Android Market is 50MB. If you're even one byte over this, I believe that the upload will fail. See this blog post for reference.

Categories

Resources