You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "jondspa (via GitHub)" <gi...@apache.org> on 2023/01/26 23:35:11 UTC

[GitHub] [cordova-android] jondspa opened a new issue, #1552: Java exception when doing an android build

jondspa opened a new issue, #1552:
URL: https://github.com/apache/cordova-android/issues/1552

   # Bug Report
   
   ## Problem
   
   Getting a Java exception when doing a build on a freshly installed system.  I've been trying to update my Cordova app to API 31.  I've been having trouble so decided to do a fresh install on a new machine.  Loaded everything new but getting the below errors.
   
   Many thanks for any advice!
   Jon
   
   ### What is expected to happen?
   
   Build would succeed.
   
   ### What does actually happen?
   
   Getting this error message on first build.  The error continues for another 100 or so lines.  Repeated several times.
   
   Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/03 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
   Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01
   Not a number: 33x:
   java.lang.NumberFormatException: Not a number: 33x
           at com.sun.xml.bind.DatatypeConverterImpl._parseInt(DatatypeConverterImpl.java:95)
           at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$18.parse(RuntimeBuiltinLeafInfoImpl.java:712)
           at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$18.parse(RuntimeBuiltinLeafInfoImpl.java:710)
           at com.sun.xml.bind.v2.runtime.unmarshaller.TextLoader.text(TextLoader.java:39)
           at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:560)
           at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.processText(SAXConnector.java:183)
           at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.endElement(SAXConnector.java:146)
           at java.xml/org.xml.sax.helpers.XMLFilterImpl.endElement(XMLFilterImpl.java:570)
           at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:610)
           at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1718)
           at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2883)
           at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:605)
           at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
   
   On subsequent builds:
   
   Execution failed for task ':app:mergeReleaseResources'.
   > Multiple task action failures occurred:
      > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
         > AAPT2 aapt2-4.2.2-7147631-osx Daemon #3: Daemon startup failed
           This should not happen under normal circumstances, please file an issue if it does.
      > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
         > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Daemon startup failed
           This should not happen under normal circumstances, please file an issue if it does.
      > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
         > AAPT2 aapt2-4.2.2-7147631-osx Daemon #2: Daemon startup failed
           This should not happen under normal circumstances, please file an issue if it does.
      > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
         > AAPT2 aapt2-4.2.2-7147631-osx Daemon #1: Daemon startup failed
           This should not happen under normal circumstances, please file an issue if it does.
      > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
         > AAPT2 aapt2-4.2.2-7147631-osx Daemon #6: Daemon startup failed
           This should not happen under normal circumstances, please file an issue if it does.
      > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
         > AAPT2 aapt2-4.2.2-7147631-osx Daemon #4: Daemon startup failed
           This should not happen under normal circumstances, please file an issue if it does.
      > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
         > AAPT2 aapt2-4.2.2-7147631-osx Daemon #5: Daemon startup failed
           This should not happen under normal circumstances, please file an issue if it does.
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   Cordova build android --release
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   Mac OS 12.5
   
   ### Version information
   Cordova version 11.1.0
   Cordova-android 10.1.2
   target SDK version 31
   Gradle version 7.6
   Gradle wrapper 7.1
   Android build tools 30.0.3
   Java version 11.0.17
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [X] I searched for existing GitHub issues
   - [X] I updated all Cordova tooling to most recent version
   - [X] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek commented on issue #1552: Java exception when doing an android build

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek commented on issue #1552:
URL: https://github.com/apache/cordova-android/issues/1552#issuecomment-1405872221

   Compiling/targeting API 31+ requires build tools 31+. I believe this is why AAPT is failing.
   
   Cordova-android@10 doesn't officially support targeting API 31+. The project should be upgraded to cordova-android@11.
   
   Build tools 31+ also requires Java11, which I see you are already using.
   
   If it's not possible or feasible to upgrade, then you might be able to get by by setting `android-targetSdkVersion` to `31`, and `android-buildToolsVersion` to `31.0.0` (version should match the installed version identically... so if yoi have version 31.0.1 installed then the preference value should match. As cordova-android@10 doesn't support API 31, your mileage may vary.
   
   If neither upgrading to cordova-android@11 or my hack workaround works for you, then like the error says a bug should be reported, but it should be reported to the Android SDK, which can be done [here](https://issuetracker.google.com/issues?q=status:open%20componentid:192633&s=created_time:desc).
   
   If you have further questions, don't hesitate to ask, but I'll be closing this issue as the reported stack trace indicates a bug with AAPT, not Cordova.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-android] breautek closed issue #1552: Java exception when doing an android build

Posted by "breautek (via GitHub)" <gi...@apache.org>.
breautek closed issue #1552: Java exception when doing an android build
URL: https://github.com/apache/cordova-android/issues/1552


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org