アプリ版:「スタンプのみでお礼する」機能のリリースについて

Could not find method compile() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
このようなエラーがでてきます。解決法を教えてください。

A 回答 (1件)

Android Studio 4.0 にバージョンアップしてからエラーが出る場合ですか?



>Could not find method compile() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler
→(エラー文面が少し違うが)→
<エラーCould not find method implement() for arguments [file collection] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.>の場合
修正
1)implementation を compile に変更
dependencies {
compile files('libs/universal-image-loader-1.9.1.jar')
compile files('libs/zip4j_1.0.8.jar')
compile 'com.android.support:support-v4:28.0.0'
compile 'com.android.support:appcompat-v7:28.0.0'
}

2)mavenを読み込むように追加
maven { url 'https://maven.google.com' }

参考URL
https://www.mt-megami.com/article/%E3%82%A8%E3%8 …
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!