I'm having a strange issue when trying to build a basic PhoneGap app on OS X. The app is setup with just the Android platform. I'm getting the following error when I enter "PhoneGap build".
:processDebugManifest
/Volumes/Data/Tests/my-app/platforms/android/AndroidManifest.xml:15:5 Error:
uses-sdk:minSdkVersion 7 cannot be smaller than version 10 declared in library /Volumes/Data/Tests/my-app/platforms/android/build/intermediates/exploded-aar/android/CordovaLib/unspecified/debug/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.apache.cordova" to force usage
When I then edit the indicated file and set the line to
<uses-sdk android:minSdkVersion=“10” android:targetSdkVersion="22" />
and build again, the error doesn't change. Does this setting exist somewhere else? Or is there something else going on here?
The AndroidManifest.xml file is overwritten during the build process by the values from config.xml. You should define this properties in the config.xml file.
Reference:
http://docs.build.phonegap.com/en_US/3.3.0/configuring_preferences.md.html#Preferences
<preference name="android-minSdkVersion" value="10" />
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.
Strange problem with Manifest Merger, Visual Studio Mac, Xamarin Forms (5.0.0.2125), Android project, SDK 29 to 30. Problem initiated from an extra ">" in the Properties/AndroidManifest.xml file. That generated the error below, indicating the xml structure wasn't closed; line 35, column 11 being was the last line and character of the Properties/AndroidManifest.xml.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3): Error AMM0000: Error: org.xml.sax.SAXParseException; lineNumber: 35; columnNumber: 11; XML document structures must start and end within the same entity. (AMM0000)
So, I edited out the extra character, and the obj/debug/AndroidManifest.xml is created and looks right, however, the build error remains the same!
Subsequent complete rewrites and edits of the Properties/AndroidManifest.xml file have only 2 outcomes
Entering an erroneous xml format will generate the appropriate errors describing the error.
Entering a correct xml format, with any combination of entries, lines and characters will generate a correct obj/debug/AndroidManifest.xml file with the the correct Properties/AndroidManifest.xml content. However, the original build errors stay, with the " line 35, column 11 being was the last line and character of the Properties/AndroidManifest.xml." error.
So, something cached, somewhere, but no clue where. Started during an aborted simulator build and has been here ever since.
Have tried quite few things including:
cleaning, rebuilding and many combinations
remove obj and bin
removing/adding declarations in the AndroidManifest.xml
using different AndroidManifest.xml files
deleting AndroidManifest.xml and running
restoring from cloud a different version of solutions
commenting out Activity declaration on MainActivity
reinstall of VS for Mac
I think it is similar to this bug
Xamarin android Manifest being replaced on build. only solution seems to be to repair visual studio
Has anyone seen this type of bug before?
Help much appreciated as have run out of ideas here.
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="17" android:versionName="1.17" package="com.mycompany.myapp">
<uses-sdk android:minSdkVersion="29" android:targetSdkVersion="30" />
<application android:label="myapp" android:icon="#mipmap/ic_launcher" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
</manifest>
Solved here, github.com/xamarin/xamarin-android/issues/6385. Was a problem in a Nuget Firebase library AndroidManifest.xml file. Unfortunately the error reporting in VS Mac Manifest merging doesn't report which of the 140+ AndroidManifest.xml files has the problem. However, with a bit of sleuthing, there is a way to eventually work it out.
My App class implements Configuration.Provider.getWorkManagerConfiguration, and regarding this article: https://developer.android.com/topic/libraries/architecture/workmanager/advanced/custom-configuration#on-demand
I switched default initializer with this string in my AndroidManifest.xml:
<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove" />
The code works as I need - no default initializer calls, but the only Configuration.Provider.getWorkManagerConfiguration.
If I run lint check I still see the error: Remove androidx.work.impl.WorkManagerInitializer when using on-deman initialization.
Android studio 4.1 beta 5
Gradle plugin: 4.1.0-beta05
Work manager: 2.3.4
Any thoughts on how to deal with it?
New to appcelerator, i have genymotion installed and wanna laun kitchen sink inside it but i get following errors, i already checked solutions on google but nothing found:
[ERROR] Application Installer abnormal process termination. Process exit value was 1
[ERROR] : The minimum supported SDK version must be 10 or newer, but is currently set to 8
Update the android:minSdkVersion in the tiapp.xml or custom AndroidManifest to at least 10:
Inside tiapp.xml i have not android:minSdkVersion and i don't found any android manifest inside the project.
Thanks for your help.
At tiapp.xml of KitchenSink official repository.
You should add:
...
<android xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10"/>
....
I hope my answer helps you ;)
I'm building a c project in Eclipse-android and get the following error:
This is a ndk build error (independent to my code)
/Users/eladb/MyWorkspace/android-ndk-r8e/build/gmsl/__gmsl:512: *** non-numeric second argument to 'wordlist' function: ''. Stop.
tried
android-ndk-r8b
android-ndk-r8e
how can I fix this?
This is a known problem due to the r8d NDK not picking up properly the android:minSdkVersion property from the AndroidManifest.xml.
To work around that issue change the line 512 of the file /android-ndk-r8d/build/gmsl/__gmsl to:
int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))
In your AndroidManifest, add the following line:
<uses-sdk android:minSdkVersion="3" />
This fixed the problem for me. You generally get this when importing a project you downloaded, as newly generated projects don't have that kind of error.
For information, this issue is also reproductible from the command-line.
Looks like the XML parsing code in ndk-build is sensitive to whitespace (as of r8e.) I was getting this error when I had the following line in my manifest:
<uses-sdk android:minSdkVersion ="10" android:targetSdkVersion="11" />
The problem went away when I replaced it with the following line, removing the whitespace between minSdkVersion and the = sign:
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="11" />
Ugh.
It's debatable whether you should patch the ndk (as described in the accepted answer) or do a workaround on the application side. I chose the workaround, as I work on a team with several different environments where we need to build, including a shared CI server, and I didn't want to go around patching the ndk for each environment and for each new developer. If you work solo, the accepted answer may be more appropriate as it will be fixed for your future projects as well.
Try to change your file carriage control (\r\n) to linux format (\n)
To fix this, I edited the file in vi and did a "set filetype=unix"
just got into the same issue
"....android-ndk-r12b/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist' function: '18e'. Stop."
if you get this 18e, the e can be anything this is because that in the Application.mk you added a letter to the APP_PLATFORM
"APP_PLATFORM := android-18e"
and it should be
"APP_PLATFORM := android-18"
with no letter in the end, this solve the misstype which by the way i don't know when and how it has been added as i didn't open this file for weeks now, STRANGE !
Update your NDK to r15b or latter. For me its work.