Suddenly having an error in my AndroidManifest
"APP.Android\obj\Debug\100\android\manifest\AndroidManifest.xml 19"
Also (Resolved - messed up with DevExpress)
Ambiguity between 'Resource.Layout' and 'Resource.Layout' "APP.Android\MainActivity.cs 25 Active"
It is working before and I didn't changed anything here:
TabLayoutResource = Resource.Layout.CustomTabbar;
Already delete the bin and obj folder and clean/rebuild the solution, but the error still exist.
Resource
AndroidManifest.xml
For the error (unexpected element queries found in manifest) in your
AndroidManifest.xml.
From document Query & Interact with Apps in Android 11 with Package Visibility, we could find that the queries element is a feature of Android 11, so you can try to update your nuget to the latest version and change your project Target Framework to Android 11 and try again.
Related
I am in the process of upgrading a Xamarin Android application to SDK 31, monodroid 12 and the latest androidx packages.
Every thing is now up and running except if I do not add the android:debuggable=true attribute to the android manifest I can not create debug builds.
The issue does not happen for release builds
The output error is
Target _ManifestMerger:
/Library/Java/JavaVirtualMachines/microsoft-11.jdk/Contents/Home/bin/java -cp /Library/Frameworks/Xamarin.Android.framework/Libraries/xbuild/Xamarin/Android/manifestmerger.jar com.xamarin.manifestmerger.Main obj/Debug/android/manifestmerger.rsp
/Users/Projects/app/Droid/obj/Debug/AndroidManifest.xml:14:230-255 Error:
Attribute application#debuggable value=(true) from AndroidManifest.xml:14:230-255 is also present at AndroidManifest.xml:15:9-35 value=(false).
Suggestion: add 'tools:replace="android:debuggable"' to element at AndroidManifest.xml:14:3-56:17 to override.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(1489,3): error MSB6006: "java" exited with code 1.
Done building target "_ManifestMerger" in project "Droid.csproj" -- FAILED.
To get this working I currently have applied the following to the application node in the AndroidManifest.xml
tools:replace="android:debuggable" android:debuggable="true"
I would really like to figure out what this is and get it removed for obvious reasons before release.
My application was originally written using Delphi v10.2.2 and TBannerAd worked just fine.
Without any code changes and after upgrading Delphi to v10.2.3 (by installing over the existing v10.2.2 using the ISO without changing anything in the installation dialogs), calling TBannerAd's "LoadAd" method started triggering this exception:
Project myproject.apk raised exception class EJNIException with message
'java.lang.IllegalStateException: The meta-data tag in your app's
AndroidManifest.xml does not have the right value. Expected 4323000
but found 7095000. You must have the following declaration within the
< application > element: < meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" / >'.
I reviewed the AndroidManifest.xml file and indeed the "7095000" value is used, but I don't know why/how delphi uses this value. Rebuilding the project generates a new AndroidManifest.xml file with the "7095000" value, so I can't directly edit the XML file as a work-around.
What causes this? Is it some setting or SDK path that changed due to the upgrade? (I tried searching but couldn't find anything relevant)
Things I tried:
Completely uninstalling the application and running it again from Delphi (on a real device, a Galaxy note 4).
Under options, changing the NDK API location and C++ Builder NSK Library paths from "\platforms\android-14" to "\platforms\android-19".
Tokyo 10.2.3 has updated Google Play Services and its libraries.
Applications created with old version don't automatically update the libraries to new ones shipped with 10.2.3 release.
To update the libraries go to Project Manager -> Android -> Android SDK xxx -> Libraries and select "Revert System Files to Default" from the popup menu.
After reverting list of included libraries should be
Rendering Problems
"high_quality" in attribute "breakStrategy" is not a valid integer
([N] similar errors not shown)
Tip: Try to refresh the layout.
([N] is a variable number.)
This message was produced after I restarted Android Studio, for all activities and any other design-able files (such xml/pref_XXX.xml files)!
I searched all project files (Ctrl+Shift+F) for "high_quality" and "breakStrategy" but found nothing!
The interesting note is no problem in designing! Just show this message.
Also, I tried Clean Project, Rebuild Project, Synchronize (Ctrl+Alt+Y), Synchronize app, pressing the refresh hyperlink inside the mentioned message, restarting Android Studio again, ... But no avail!
I have updated the android sdk build-tools, platfom-tools, API 25 and works.
I was about to work on swipe tabs and upon creating a new android application project, I set the minimum required SDK in Honeycomb (3.0), my target SDK in Kitkat (4.4) and to compile it with Jellybean (4.3). Now, the first problem I encountered was I wasn't able to create a new project. I clicked the finish button but nothing happens.
As soon as I was able to create a file, I haven't typed a code but there were already several errors saying that "R cannot be resolved to a variable" I figured out it was because of the compatibility measurements so I quickly updated my SDK. Every single possible update, I updated it. I have also read that I need to update my ADT Plugins as well so I did what Murtuza Kabul said here How to update ADT. I ran my Eclipse as admin and this is the error message I got
Error when loading the SDK
Error: Error parsing
C:\adt-bundle-windows-x86-20140702\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml
cvc-complex-type.2.4.d: Invalid content was found starting with
element 'd:skin'. No child element is expected at this point. Error:
Error parsing
C:\adt-bundle-windows-x86-20140702\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml
cvc-complex-type.2.4.d: Invalid content was found starting with
element 'd:skin'. No child element is expected at this point.
Would somebody please give me some guidance?
ThereĀ“s a kind of problem with android wear packages for API 22, so my solution was deleting this two packages from the API 22
Now the problem is solved =)
Error: Error Parsing
C:\Android\sdk\system-images\android-22\android-wear\armeabi-v7a\devices.xml
Invalid content was found starting with element 'd:Skin'. No child
element is expected at this point.
I was going through this sample package which Google has provided with it's sdk. I tried changing the api level to 7 and observed that there were many unresolved errors in the project.
I'm listing a few here:
ICE_CREAM_SANDWICH cannot be resolved or is not a field (ActionBarActivity.java)
R cannot be resolved to a variable (This is probably due to the fact my xml also contains errors)
SHOW_AS_ACTION_IF_ROOM cannot be resolved or is not a field (ActionBarHelperBase.java)
The method setActionView(View) is undefined for the type MenuItem (ActionBarHelperHoneycomb.java)
The method getActionBar() is undefined for the type Activity (ActionBarHelperICS.java)
The import android.view.ActionProvider cannot be resolved (SimpleMenuItem.java)
in res/values-v13/styles.xml - error: Error retrieving parent for item: No resource found that matches the given name 'android:style/
TextAppearance.Holo.Widget.ActionBar.Title'.
error: Error: No resource found that matches the given name: attr 'android:actionBarStyle'. (in res/values-v11/styles.xml)
Any idea how to get rid of these errors? Basically I'm targeting android devices 2.x and later. Does using actionbarsherlock is another alternative? I read here on some post that action bar compatibility package works on 2.x android devices as well.
Right click on your project in the Package Manager, then highlight the Android node in the Properties dialog that opens. You will see a list of Project Build Targets. Select the API level 14, Android 4.0 build target. This will get rid of the error.
Unfortunately, that also means it won't show up on your emulated devices that are using Android 2.3.3. You'll have to create a new one in the AVD that supports 4.0.
You shouldn't change the api version. The manifest declares min-sdk-version as 4, which means it will work on 2.x devices. Try loading it on the emulator, using api version 14 to compile.