You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/10/14 12:20:51 UTC

[GitHub] [cordova-android] almothafar edited a comment on issue #830: Support API level 29 (Android 10)

almothafar edited a comment on issue #830: Support API level 29 (Android 10)
URL: https://github.com/apache/cordova-android/issues/830#issuecomment-541644524
 
 
   I can confirm even outside the docker still have the same issue but without failing, what I did I opened SDK Manager, I removed platform 28, and set `<preference name="android-targetSdkVersion" value="29" />`, the build continues, added platform 28 back and used it:
   
   ```
   
   Checking the license for package Android SDK Platform 28 in /Users/almothafar/Library/Android/sdk/licenses
   License for package Android SDK Platform 28 accepted.
   Preparing "Install Android SDK Platform 28 (revision: 6)".
   "Install Android SDK Platform 28 (revision: 6)" ready.
   Installing Android SDK Platform 28 in /Users/almothafar/Library/Android/sdk/platforms/android-28
   "Install Android SDK Platform 28 (revision: 6)" complete.
   "Install Android SDK Platform 28 (revision: 6)" finished.
   
   ```
   
   Inside docker I get different users, so it can't be installed, it should be installed from the previous build process.
   
   Well, it is hard to provide a project now, but I can give you some steps:
   
   1. Start with a new Ionic angular app: https://ionicframework.com/docs/angular/your-first-app 
   2. Set the config.xml as what you like.
   3. Try to run the following command to build a new app:
   
   ```
   ionic cordova build android --no-interactive --confirm --prod --aot --minifyjs --minifycss --optimizejs --release --buildConfig=build.json --verbose
   ```
   
   If you prefer to use docker again, if that issue solved, download the docker file that I linked before inside your project, build a new image using:
   
   ```
   docker build . -f Dockerfile -t ionic-builder
   ```
   
   Create a new Dockerfile inside your project, let's call it mobile.Dockerfile, then past the following line inside it:
   
   ```Dockerfile
   FROM ionic-builder
   
   ADD --chown=ionic  . .
   
   RUN rm -rf ./www ./platforms ./plugins && \
       ionic cordova build android --no-interactive --confirm --prod --aot --minifyjs --minifycss --optimizejs --release --buildConfig=build.json -- -d &&\
       mkdir -p ./output/android && \
       mv ./platforms/android ./output/android
   
   RUN rm -rf ./www ./platforms ./plugins && \
       ionic cordova prepare ios --no-interactive --confirm --prod --aot --minifyjs --minifycss --optimizejs --buildConfig=build.json -- -d &&\
       mkdir -p ./output/ios && \
       mv ./platforms/ios ./output/ios
   
   ```
   
   then run the following commands:
   
   ```
   docker build . -f mobile.Dockerfile -t ionic-release
   
   docker run -v ./build-output:/app/mount --rm --entrypoint cp ionic-release:latest -r output/ios/ios mount
   
   docker run -v ./build-output:/app/mount --rm --entrypoint cp ionic-release:latest -r output/android/android mount
   ```
   
   The last 2 lines will extract built folders outside the docker image `ionic-release` to your project, but the issue will happen and fail when you build `ionic-release`, while `ionic-builder` needed one time if you don't do any change to `Dockerfile`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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