brodybits commented on issue #565: androidx
URL: https://github.com/apache/cordova-android/issues/565#issuecomment-459107079
 
 
   Thanks @davidschreiber. I was able to reproduce a successful build with 
AndroidX using 
[`PSPDFKit/Cordova-Android`](https://github.com/PSPDFKit/Cordova-Android) 
(latest release) and no other plugins as follows:
   - create new Cordova project: `cordova create cbtest1`
   - cd cbtest1
   - `cordova plugin add https://github.com/PSPDFKit/Cordova-Android#5.1.1` 
(latest version so far)
   - `cordova platform add [email protected]`
   - add the evaluation license info to `platforms/android/local.properties`, 
as given above by @davidschreiber
   - `cordova build android -- --gradleArg=-PcdvCompileSdkVersion=android-28`
   
   A few minor points so far:
   - I used specific nightly and GitHub tags for the sake of maximum 
reproducibility, in a similar fashion to the steps given above.
   - I ignored some D8 warning messages since I did not configure D8 as 
described above.
   - My build stopped at `pspdfkit-demo-5.1.1.aar` due to an issue with my 
internet connection. When I retried the same build command then it continued 
successfully.
   
   Here is how I reproduced the build failure with AndroidX and the old Support 
Library:
   
   - I made a new test project with plugin from 
`https://github.com/PSPDFKit/Cordova-Android#5.1.1` (it should be good enough 
to just remove the `platforms` directory)
   - `cordova plugin add [email protected]` (latest version to date)
   - `cordova platform add [email protected]` (same as 
above)
   - copy the evaluation license info to `platforms/android/local.properties`, 
as given above by @davidschreiber
   - `cordova build android -- --gradleArg=-PcdvCompileSdkVersion=android-28 
--gradleArg=--stacktrace`
   
   I got the following build failure output:
   
   ```
   :app:transformClassesWithMultidexlistForDebug FAILED
   
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
   > com.android.build.api.transform.TransformException: Error while generating 
the main dex list.
   ```
   
   Here is how I reproduced a working AndroidX build with 
[`PSPDFKit/Cordova-Android`](https://github.com/PSPDFKit/Cordova-Android) and 
apache/cordova-plugin-camera#418:
   
   - removed the existing Android build project (`rm -rf platforms`)
   - `cordova plugin add 
https://github.com/davidschreiber/cordova-plugin-camera\#davidschreiber/androidx-migration`
 (as given above by @davidschreiber)
   - `cordova platform add [email protected]` (same as 
above)
   - copy the evaluation license info to `platforms/android/local.properties`, 
as given above by @davidschreiber
   - `cordova build android -- --gradleArg=-PcdvCompileSdkVersion=android-28 
--gradleArg=--stacktrace`
   
   As a next step I hope we can find an easier way to reproduce the failure 
with AndroidX due to the conflict with plugins using the old support library. I 
hope to work on it soon, cannot make any promises right now.
   
   I hope we can get this resolved in the Apache Cordova plugins before we 
finish the Cordova 9 release (apache/cordova#10).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to