title: Android: Could not find or load main class org.gradle.wrapper.GradleWrapperMain
body: <p>I am trying to build my project on GitLab CI but unfortunately for me I keep getting this error inside the runner:</p>
  
  <p><code>Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain</code></p>
  
  <p>Now I know there is something wrong with my environment but I just cant get my mind wrapped around the problem. I searched on the web and I found I needed to update my <code>.gitignore</code> file and I did here it is:</p>
  
  <pre><code>### Java ###
  *.class
  
  ### Android ###
  *.apk
  *.ap_
  
  ### Package files ###
  *.war
  *.ear
  *.aar
  
  ### Gradle ###
  .gradle
   build
  bin/
  build/
  build.xml
  gen/
  .gradle/
  gradlew
  gradlew.bat
  gradle-wrapper.jar
  gradle-wrapper.properties
  
  ### Android Studio ###
  .idea
  local.properties
  .DS_Store
  /captures
  </code></pre>
  
  <p>I also eddied my <code>gradle.build</code> to contain the following lines: </p>
  
  <pre><code>task wrapper(type: Wrapper) {
  gradleVersion = '2.0' 
  }
  </code></pre>
  
  <p>But again every time I run a build I get stack! Here is also my <code>.gitlab-ci.yml</code>:</p>
  
  <pre><code>before_script:
  - apt-get --quiet update --yes
  - apt-get --quiet install --yes wget tar unzip openjdk-7-jdk lib32stdc++6   lib32z1
   - wget --quiet --output-document=gradle.zip https://services.gradle.org/distributions/gradle-2.8-bin.zip
   - unzip -q gradle.zip
   - export ANDROID_HOME="/opt/android-sdk"
   - chmod +x gradlew
  
   dev:
   script:
   - ./gradlew assembleDebug
  </code></pre>
  
  <p>And the line where the error appears is:</p>
  
  <pre><code>- wget --quiet --output-document=gradle.zip https://services.gradle.org/distributions/gradle-2.8-bin.zip
  </code></pre>