2

私のプロジェクトでreact-native-fbsdkを使用しようとしています。react-native-fbsdkと反応ネイティブrun-androidを起動する際のエラー

反応性ネイティブfbsdkのconfigに続き、 react-native run-iosではreact-native run-androidで問題なく動作します。ここで

は私が*.gradleと、すべてのファイルの中のキーワードCompileOptions.bootClasspathを見つけることが、何も見つからなかったときにエラーメッセージ

> Configure project :react-native-vector-icons 
 
The CompileOptions.bootClasspath property has been deprecated and is scheduled to be removed in Gradle 5.0. Please use the CompileOptions.bootstrapClasspath property instead. 
 

 

 
FAILURE: Build failed with an exception. 
 

 
* What went wrong: 
 
A problem occurred configuring project ':app'. 
 
> Could not resolve all dependencies for configuration ':app:_debugApk'. 
 
    > A problem occurred configuring project ':react-native-vector-icons'. 
 
     > Failed to notify project evaluation listener. 
 
     > com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V

です。

この問題を解決する方法はありますか?どうもありがとうございます!

私は次のバージョンがインストールされている:

[email protected]

[email protected]ここ

はで私のbuild.gradleですProjectName /アンドロイド。私はこのプロジェクトでgradle 2.2.3を使用していると思います。

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

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

 
allprojects { 
 
    repositories { 
 
     mavenLocal() 
 
     jcenter() 
 
     maven { 
 
      // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm 
 
      url "$rootDir/../node_modules/react-native/android" 
 
     } 
 
    } 
 
}

私は、ファイルや実行中のバージョンを変更してみてくださいました。 別のエラーメッセージが表示されます。

> Could not resolve all files for configuration ':classpath'. 
 
    > Could not find com.android.tools.build:gradle:4.2. 
 
    Searched in the following locations: 
 
     https://jcenter.bintray.com/com/android/tools/build/gradle/4.2/gradle-4.2.pom 
 
     https://jcenter.bintray.com/com/android/tools/build/gradle/4.2/gradle-4.2.jar 
 
    Required by: 
 
     project :

+0

どのバージョンのgradleを使用していますか? –

+0

android/gradle/wrapperの 'gradle-wrapper.properties'です。 'distributionUrl = https \:// services.gradle.org/distributions/gradle-4.3-rc-2-all.zip' 私はv4.3を使用していると思います。 –

+0

同じ問題を抱えている人が助けてください。グラデル 'Gradle 2.10を使う -------------------------------------------- ---------------- ビルド時間:2016年1月26日午後三時17分49秒UTC ビルド番号:なし リビジョン:UNKNOWN なGroovy:2.4.5 アリ:2015年7月8日にコンパイルされたApache Ant(TM)バージョン1.9.6 JVM:1.8.0_151(Oracle Corporation 25.151-b12) OS:Linux 4.4.0-38-generic amd64' –

答えて

0

私は私のプロジェクトでこれと同じ問題がありました。 すべてを忘れて、このプロジェクトを削除してください。 このリンクを使用して新しいプロジェクトを作成します。 [https://facebook.github.io/react-native/docs/getting-started.html]

あなたが最初にjdkとandroid studioを完全にインストールし、両方の環境変数を設定してから "react-native init AwesomeProject"コマンドを実行することを確認してください。

これは私にとってはうまくいきます。あなたにとってもうまくいくことを祈っています。

関連する問題