2017-08-31 7 views
1

には低すぎるこれが反応し、ネイティブ反応するネイティブコンパイルエラーが:SDKツールのリビジョンを作成し、プロジェクト

である私は、コンパイルに慣れていないよので、任意のヘルプを歓迎しています。

今日私は自分のプロジェクトをコンパイルできません。何時間も作業していてコンパイルしていますが、私は反応パッケージを更新しようとしましたが、エラーが発生します。だから、私はgit stash(ロールバック)でプロジェクトを隠し、前の作業ファイルを取得します。 node_modulesを再インストールしますが、問題が表示されます。私は、インストールパッケージ

>react-native run-android 
    ... 
    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-image-crop-picker'. 
      > The SDK Build Tools revision (23.0.3) is too low for project ':react-native-image-crop-picker'. Minimum required is 25.0.0 

再、/myProject/android/build.gradle

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

/myProject/android/app/build.gradle

apply plugin: "com.android.application" 
... 
android { 
    compileSdkVersion 23 
    buildToolsVersion '25.0.0' 

    defaultConfig { 
     applicationId "com.iosreacttestplantnet2" 
     minSdkVersion 16 
     targetSdkVersion 22 
     versionCode 1 
     versionName "1.0" 
     ndk { 
      abiFilters "armeabi-v7a", "x86" 
     } 
     vectorDrawables.useSupportLibrary = true 
    } 
    splits { 
     abi { 
      reset() 
      enable enableSeparateBuildPerCPUArchitecture 
      universalApk false // If true, also generate a universal APK 
      include "armeabi-v7a", "x86" 
     } 
    } 
    buildTypes { 
     release { 
      minifyEnabled enableProguardInReleaseBuilds 
      proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" 
     } 
    } 
    applicationVariants.all { variant -> 
     variant.outputs.each { output -> 
      def versionCodes = ["armeabi-v7a":1, "x86":2] 
      def abi = output.getFilter(OutputFile.ABI) 
      if (abi != null) { // null for the universal-debug, universal-release variants 
       output.versionCodeOverride = 
         versionCodes.get(abi) * 1048576 + defaultConfig.versionCode 
      } 
     } 
    } 
} 

dependencies { 
    compile project(':react-native-vector-icons') 
    compile project(':react-native-maps') 
    compile project(':react-native-camera') 
    compile project(':react-native-image-crop-picker') 
    compile project(':react-native-exif') 
    compile project(':react-native-photo-view') 
    compile project(':react-native-i18n') 
    compile fileTree(dir: "libs", include: ["*.jar"]) 
    compile "com.android.support:appcompat-v7:23.0.1" 
    compile "com.facebook.react:react-native:+" // From node_modules 
} 
task copyDownloadableDepsToLibs(type: Copy) { 
    from configurations.compile 
    into 'libs' 
} 
をファイルにバージョンを変更するいくつかの時間を試してみてください

MyProject/android/app/src/main

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.iosreacttestplantnet2" 
    android:versionCode="1" 
    android:versionName="1.0"> 

    <uses-permission android:name="android.permission.CAMERA"/> 
    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/> 
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 
    <uses-sdk 
     android:minSdkVersion="16" 
     android:targetSdkVersion="22" /> 

    <application 
     android:name=".MainApplication" 
     android:allowBackup="true" 
     android:label="@string/app_name" 
     android:icon="@mipmap/ic_launcher" 
     android:theme="@style/AppTheme"> 
     <meta-data 
     android:name="com.google.android.geo.API_KEY" 
     android:value="AIzaSyCGUcCxkCNyU9WBVYcGoTUexD-Xwlo2U4Q"/> 
     <activity 
     android:name=".MainActivity" 
     android:label="@string/app_name" 
     android:configChanges="keyboard|keyboardHidden|orientation|screenSize" 
     android:windowSoftInputMode="adjustResize"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
     </activity> 
     <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> 
    </application> 

</manifest> 

MyProjectと/ package.json

"react-native-image-crop-picker": "^0.14.2", 

答えて

1

あなたは、対応するAndroidのSDKをダウンロードする必要があるので、あなたは、react-native-image-crop-pickerbuild.gradleファイルのgitの履歴から6月23日に25から23からcompileSdkVersion & targetSdkVersion変化を見ることができますreact-native-image-crop-picker作品を作る。

+0

私はそれをアンドロイド4.Xで動作させる必要があるので、minSdkVersion 17 – AlainIb

関連する問題