imperyal opened a new issue #1323:
URL: https://github.com/apache/cordova-android/issues/1323


   # Bug Report
   
   ## Problem
   The build fails
   
   ### What is expected to happen?
   The build should succeed.
   
   ### What does actually happen?
   When I add
   `<preference name="GradlePluginGoogleServicesEnabled" value="true" />`
   `<preference name="GradlePluginGoogleServicesVersion" value="4.2.0" />`
   to my `config.xml` the build fails.
   
   
   ## Reproduce
   ### 1 - Create a new Cordova project and add android 10.0.1
   `cordova create androidTest`
   `cd androidTest`
   `cordova platform add android@10.0.1`
   
   ### 2 - Add to `config.xml`:
   `<preference name="GradlePluginGoogleServicesEnabled" value="true" />`
   `<preference name="GradlePluginGoogleServicesVersion" value="4.2.0" />`
   
   ### 3 - The build fails
   `cordova build android`
   
   
   ## Environment, Platform, Device
   
   
   ### Version information
   `cordova info`
   
   Cordova Packages:
   
       cli: 10.0.0
           common: 4.0.2
           create: 3.0.0
           lib: 10.0.0
               common: 4.0.2
               fetch: 3.0.0
               serve: 4.0.0
   
   Project Installed Platforms:
   
       android: 10.0.1
   
   Project Installed Plugins:
   
       cordova-plugin-whitelist: 1.3.5
   
   Environment:
   
       OS: macOS 11.5.1 (20G80) (darwin 20.6.0) x64
       Node: v12.18.0
       npm: 6.14.8
   
   android Environment:
   
       android:
   ERROR: Command failed with exit code 1: android list target
   Exception in thread "main" java.lang.NoClassDefFoundError: 
javax/xml/bind/annotation/XmlSchema
        at 
com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
        at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
        at 
com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
        at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
        at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
   Caused by: java.lang.ClassNotFoundException: 
javax.xml.bind.annotation.XmlSchema
        at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at 
java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 5 more
   *************************************************************************
   The "android" command is deprecated.
   For manual SDK, AVD, and project management, please use Android Studio.
   For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
   *************************************************************************
   Running /Users/imperyal_dev/Library/Android/sdk/tools/bin/avdmanager list 
target
   
   
   Project Setting Files:
   
       config.xml:
   ```
   <?xml version='1.0' encoding='utf-8'?>
   <widget id="io.cordova.hellocordova" version="1.0.0" 
xmlns="http://www.w3.org/ns/widgets"; 
xmlns:cdv="http://cordova.apache.org/ns/1.0";>
       <name>HelloCordova</name>
       <description>
           A sample Apache Cordova application that responds to the deviceready 
event.
       </description>
       <author email="d...@cordova.apache.org" href="http://cordova.io";>
           Apache Cordova Team
       </author>
       <content src="index.html" />
       <access origin="*" />
       <allow-intent href="http://*/*"; />
       <allow-intent href="https://*/*"; />
       <allow-intent href="tel:*" />
       <allow-intent href="sms:*" />
       <allow-intent href="mailto:*"; />
       <allow-intent href="geo:*" />
       <platform name="android">
           <allow-intent href="market:*" />
           <preference name="GradlePluginGoogleServicesEnabled" value="true" />
           <preference name="GradlePluginGoogleServicesVersion" value="4.2.0" />
       </platform>
       <platform name="ios">
           <allow-intent href="itms:*" />
           <allow-intent href="itms-apps:*" />
       </platform>
   </widget>
   ```
   
       package.json:
   --- Start of Cordova JSON Snippet ---
   ```
   {
     "plugins": {
       "cordova-plugin-whitelist": {}
     },
     "platforms": [
       "android"
     ]
   }
   ```
   --- End of Cordova JSON Snippet ---
   
   
   ## 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-unsubscr...@cordova.apache.org

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



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

Reply via email to