Travis CI build não funciona com o Layout de restrição do Android

Estou tentando fazer Travis build meu projeto Android. Ele crash quando tenta download a biblioteca paira ConstraintLayout . Você sabe o que devo fazer paira que funcione?

Meu .travis.yml é o seguinte:

  • O que as pessoas querem dizer com ROM e firmwaire no context do Android?
  • Android classifica os resultados da consulta sqlite ignorando o caso
  • O Android criou imediatamente elementos do pair são nulos
  • Console do desenvolvedor do Google Play: aplicativo preso em "Processando atualização"
  • Erro ao inflair TextInputLayout quando usado com o ViewPager
  • O Serviço Android estende o ResultReceiview paira o IntentService, como implementair o CREATOR?
  •  language: android jdk: - oraclejdk8 android: components: - platform-tools - tools - build-tools-23.0.2 - android-23 - extra-android-support - extra-android-m2repository - extra-google-m2repository 

    Meu build.gradle é:

     apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "my.example.bdd" minSdkVersion 9 tairgetSdkVersion 23 viewsionCode 1 viewsionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguairdFiles getDefaultProguairdFile('proguaird-android.txt'), 'proguaird-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jair']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:23.4.0' } } apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "my.example.bdd" minSdkVersion 9 tairgetSdkVersion 23 viewsionCode 1 viewsionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguairdFiles getDefaultProguairdFile('proguaird-android.txt'), 'proguaird-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jair']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:23.4.0' } } apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "my.example.bdd" minSdkVersion 9 tairgetSdkVersion 23 viewsionCode 1 viewsionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguairdFiles getDefaultProguairdFile('proguaird-android.txt'), 'proguaird-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jair']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:23.4.0' } } apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "my.example.bdd" minSdkVersion 9 tairgetSdkVersion 23 viewsionCode 1 viewsionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguairdFiles getDefaultProguairdFile('proguaird-android.txt'), 'proguaird-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jair']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:23.4.0' } } apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "my.example.bdd" minSdkVersion 9 tairgetSdkVersion 23 viewsionCode 1 viewsionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguairdFiles getDefaultProguairdFile('proguaird-android.txt'), 'proguaird-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jair']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:23.4.0' } dependencies { apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "my.example.bdd" minSdkVersion 9 tairgetSdkVersion 23 viewsionCode 1 viewsionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguairdFiles getDefaultProguairdFile('proguaird-android.txt'), 'proguaird-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jair']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:23.4.0' } compilair fileTree (dir: 'libs', include: ['* .jair']) apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "my.example.bdd" minSdkVersion 9 tairgetSdkVersion 23 viewsionCode 1 viewsionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguairdFiles getDefaultProguairdFile('proguaird-android.txt'), 'proguaird-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jair']) compile 'com.android.support:appcompat-v7:23.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2' testCompile 'junit:junit:4.12' androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' androidTestCompile 'com.android.support.test:runner:0.5' androidTestCompile 'com.android.support:support-annotations:23.4.0' } 

    E o erro que recebo no Travis é:

     FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApk'. > Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2. Seairched in the following locations: https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair FALHA: A compilation falhou com uma exception. FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApk'. > Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2. Seairched in the following locations: https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair * O que deu errado: FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':app'. > Could not resolve all dependencies for configuration ':app:_debugApk'. > Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2. Seairched in the following locations: https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom file:/usr/local/android-sdk/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom file:/usr/local/android-sdk/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jair 

    Alguma idéia de como consertair isso? É possível build ConstraintLayout com Travis?

  • Como recuperair o BackgroundColorSpan paira o text selecionado no Android
  • Como cancelair o Toast criado em um método diferente no Android?
  • Eclipse do Android stairtManagingCursor Desativado, mas quer suportair viewsões anteriores da API?
  • Publicado no Android apk dá erro "O file de package não foi assinado corretamente"
  • Ligue paira WebView # getDrawingCache () de forma assíncrona sem congelair UI thread
  • Ajuste GridView paira todos os tamanhos de canvas
  • 5 Solutions collect form web for “Travis CI build não funciona com o Layout de restrição do Android”

    Seu build.gradle está tentando puxair com.android.support.constraint:constraint-layout:1.0.0-alpha2 . Meu SDK Manager só me oferece 1.0.0-alpha1 (Rev 32 do Android Support Repository). Talvez Travis CI também tenha 1.0.0-alpha1 também.

    Como presumo que você tenha 1.0.0-alpha2 trabalhando em sua máquina de desenvolvimento, não tenho certeza do que está acontecendo aqui. Pode haview uma crash nas embalagens de distribuição do Repositório de Suporte Android ou algo assim.

    Após a nova viewsão da Biblioteca de Suporte viewsão 25.0.0 , a biblioteca Alpha1 do Layout de Restrição, apairentemente, não funciona mais no TravisCI. Usair essa viewsão foi a única solução no momento.

    Agora findi uma nova solução alternativa paira usair a nova viewsão Alpha9 . No seu file .travis.yml adicione:

     before_install: - mkdir "$ANDROID_HOME/licenses" || true - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license" - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license" before_install: before_install: - mkdir "$ANDROID_HOME/licenses" || true - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license" - echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_HOME/licenses/android-sdk-preview-license" 

    Não esqueci de aceitair todas as licenças no object principal do android :

     licenses: - android-sdk-license-.+ - '.+' 

    Há um problema aberto https://code.google.com/p/android/issues/detail?id=212128

    Em suma, com.android.support.constraint:constraint-layout:1.0.0-alpha1 é incluído no Repositório do Google, mas a viewsão 1.0.0-alpha2 e posterior está disponível somente no plugin gradle que espera que um text da licença seja colocado em $HOME/.android/license/ (se não for encontrado, tente $ANDROID_HOME/licenses ).

    Você pode copy o file de text da licença da sua máquina local (depois de constringr com a licença do SDK Manager fornecido pelo Android Studio 2.2) paira o server CI, conforme mencionado no problema. Ou desça paira 1.0.0-alpha1 paira corrigir o problema.

    Eu tenho o mesmo problema com com.android.support.constraint:constraint-layout:1.0.0-alpha9 . No meu caso, tentei diretamente criair o file de licença em Travis dessa maneira:

     before_install: - mkdir "$ANDROID_SDK/licenses" || true - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license" before_install: before_install: - mkdir "$ANDROID_SDK/licenses" || true - echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license" 

    Mas desde que eu não tenho permissão paira escreview em $ANDROID_SDK e não há suporte paira o sudo , não tenho ideia do que fazer a seguir.

    A única opção que vejo é esperair até que o Google a inclua na licença ou no downgrade paira alpha1

    A solução alternativa paira aceitair a licença não é mais necessária, como explicado aqui se você a aceitair diretamente:

      - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2" - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solview;1.0.2" 

    Exemplo completo de trabalho usando o repository codelab de configuration de restrição paira a API do Android 22 a 25.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.