4

のGradleはorg.apache.commons:commons-imagingを解決できない、まだそれが提供するリポジトリのすべての3で提供されています:のGradleはorg.apache.commonsを見つけない:コモンズ・イメージング

  • http://jump-pilot.sourceforge.net/repository

  • https://repo.adobe.com/nexus/content/repositories/public/

  • https://repository.apache.org/content/repositories/snapshots/

ログのこの部分は面白いです、Gradleのが唯一のjcenterとローカルのファイルシステムになります。

https://jcenter.bintray.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml https://jcenter.bintray.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.pom https://jcenter.bintray.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.jar ファイル:/ユーザー/ユーザー/ライブラリ/アンドロイド/ SDK /エクストラ/アンドロイド/ m2repositoryを/ユーザー/ユーザー/ライブラリ/ Android/sdk/extras /アンドロイド/ m2repository/org/apache/commons/commons-imaging /ファイル/ファイル:/ユーザー/ユーザー/ライブラリ/ 1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.pom ファイル:/Users/user/Library/Android/sdk/extras/android/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging - 1.0-SNAPSHOT.jar ファイル:/Users/user/Library/Android/sdk/extras/google/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml ファイル:/ Users /ユーザー/ライブラリ/ Android/sdk/extras/google/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.pom ファイル:/ Users/user/Library/Android/sdk /extras/google/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.jar

コンソールログ(org.apache.commons:commons-imaging:1.0-SNAPSHOTを要求する):

$ react-native run-android 
JS server already running. 
Building and installing the app on the device (cd android && ./gradlew installDebug)... 

FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring project ':app'. 
> Could not resolve all dependencies for configuration ':app:_debugCompile'. 
    > Could not find org.apache.commons:commons-imaging:1.0-SNAPSHOT. 
    Searched in the following locations: 
     https://jcenter.bintray.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml 
     https://jcenter.bintray.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.pom 
     https://jcenter.bintray.com/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.jar 
     file:/Users/user/Library/Android/sdk/extras/android/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml 
     file:/Users/user/Library/Android/sdk/extras/android/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.pom 
     file:/Users/user/Library/Android/sdk/extras/android/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.jar 
     file:/Users/user/Library/Android/sdk/extras/google/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/maven-metadata.xml 
     file:/Users/user/Library/Android/sdk/extras/google/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.pom 
     file:/Users/user/Library/Android/sdk/extras/google/m2repository/org/apache/commons/commons-imaging/1.0-SNAPSHOT/commons-imaging-1.0-SNAPSHOT.jar 
    Required by: 
     ReactNativeProject:app:unspecified > ReactNativeProject:react-native-image-store-ext:unspecified 

Co nsoleログ(org.apache.commons:commons-imaging:+を要求する):

$ react-native run-android 
JS server already running. 
Building and installing the app on the device (cd android && ./gradlew installDebug)... 

FAILURE: Build failed with an exception. 

* What went wrong: 
A problem occurred configuring project ':app'. 
> Could not resolve all dependencies for configuration ':app:_debugCompile'. 
    > Could not find any matches for org.apache.commons:commons-imaging:+ as no versions of org.apache.commons:commons-imaging are available. 
    Required by: 
     ReactNativeProject:app:unspecified > ReactNativeProject:react-native-image-store-ext:unspecified 

build.gradle

buildscript { 
    repositories { jcenter() } 
    dependencies { classpath 'com.android.tools.build:gradle:2.1.0' } 
} 
apply plugin: 'com.android.library' 
android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.1" 
    defaultConfig { 
    minSdkVersion 16 
    targetSdkVersion 22 
    versionCode 1 
    versionName "1.0" 
    } 
    lintOptions { abortOnError false } 
} 
repositories { 
    mavenCentral() 
    maven { url "http://jump-pilot.sourceforge.net/repository" } 
    maven { url "https://repo.adobe.com/nexus/content/repositories/public/" } 
    maven { url "https://repository.apache.org/content/repositories/snapshots/" } 
} 
dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:23.4.0' 
    compile "com.facebook.react:react-native:+" 
    compile 'org.apache.commons:commons-imaging:+' 
} 
+0

この問題は解決しましたか?同じ問題を抱えています。私のアプリケーションのgradleファイルにリポジトリを追加した場合にのみ動作しますが、ネイティブブリッジを作成しています。 – pomo

答えて

1

アンドロイドプロジェクト内の2 build.gradleファイルがあります:メインプロジェクトフォルダ内の1とappフォルダ内のいずれかが。リポジトリは、プロジェクトフォルダ内のすべてのプロジェクトブロックで定義する必要があります。ここでは、私のbuild.gradleの例は、成功したビルドapacheイメージングを共有します。

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.3' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 

} 

allprojects { 
    repositories { 
     jcenter() 
     maven { url "http://jump-pilot.sourceforge.net/repository" } 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 
関連する問題