1

I'm trying to setup a build process that can run when our dev commits to the GitLab repository. I'm trying to get this thing to build the APK and the method that I'm using for this is suggested by this thread the error I'm getting is here which implies that the file aapt doesn't exist. Although investigating that path it most certainly exists so I have no idea what I'm doing wrong here.

The docker container that I'm using as a base is /runmymind/docker-android-sdk/:latest then I'm using this dockerfile at /chamunks/ReactNativeAndroid/

I'm not entirely certain how I'm failing at this as I've never compiled an android app before but this process being as crazy as it is makes me wonder how anyone ever builds an android app.

Community
  • 1
  • 1
chamunks
  • 85
  • 8

1 Answers1

0

You can try deleting android/build and android/app/build directories and then call gradle to build and install the app.

For Debug you should call these in your project root directory;

  • (cd android/ && ./gradlew assembleDebug)
  • (cd android/ && ./gradlew installDebug)

For Release you should call these in your project root directory. This option needs a generated .keystore file. The produced .apk files are under android/app/build/outputs/apk path;

  • (cd android/ && ./gradlew assembleRelease)
  • (cd android/ && ./gradlew installRelease)

You might also try reinstalling your android-sdk. You might have a problem with version 23.0.3.

milkersarac
  • 3,399
  • 3
  • 31
  • 31
  • I temporarily back-burner'ed the project that this question was for but this does look like it might offer a suggestion that I hadn't tried yet. I generated the android/ directory before trying it on GitLab-CI – chamunks Feb 22 '17 at 05:54