2017-12-22 10 views
1

私はゲームを含むアプリを開発しています。私の友人はUnityで書かれたゲームのために私にgradleプロジェクトを送った。それとは別に、どちらも完璧に動作します。しかし、アプリから実行するモジュールとしてゲームを追加したときにビルドの問題が発生しています。私はそれがgradleのためだと知っています。私は解決策を見つけようとしましたが成功しませんでした。私が受けてるエラーは次のとおりです。プロジェクトの設定が一致しません

GAME

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN 
buildscript { 
    repositories { 
     jcenter() 
    } 

    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.1' 
    } 
} 

allprojects { 
    repositories { 
     flatDir { 
     dirs 'libs' 
     } 
    } 
} 

apply plugin: 'com.android.application' 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
} 

android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.2' 

    defaultConfig { 
     targetSdkVersion 25 
     applicationId 'pl.moonlit.projectx.towergame' 
    } 

    lintOptions { 
     abortOnError false 
    } 

    aaptOptions { 
     noCompress '.unity3d', '.ress', '.resource', '.obb' 
    } 


    buildTypes { 
     debug { 
      minifyEnabled false 
      useProguard false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt' 
      jniDebuggable true 
     } 
     release { 
      minifyEnabled false 
      useProguard false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt' 
      signingConfig signingConfigs.debug 
     } 
    } 

} 

APP

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    defaultConfig { 
     applicationId "com.example.maksym.jti" 
     minSdkVersion 16 
     targetSdkVersion 26 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 

    } 
} 

dependencies { 
    ... 
    compile project(path: ':Tower Game') 
} 
+0

あなたのAndroid Studioのバージョンは何ですか? –

+0

Androidスタジオ3.0.1 – Bartos

答えて

1

終了し、既存のIDEウィンドウ:ここ

Could not resolve project :Tower Game. 
Required by: 
    project :app 
> Unable to find a matching configuration of project :Tower Game: 

は私のGradleファイルです。

AndroidStudioからプロジェクトを開き、プロジェクトが存在するディレクトリに移動します。

ファイルの中での設定を選択すると、すべての依存関係が正しくダウンロードされ、正しく開きます。

+0

機能していない、ごめんなさい:/ – Bartos

関連する問題