运行应用时出现Android错误

时间:2016-06-01 05:28:42

标签: android plugins

我在尝试运行app时遇到以下错误。我之前已经更新了Android Studio.Gradle也发布在下面。 错误:

foreach ($accounts as $account) {
   $transactions = $account->getTransactions();

   $transaction_total = 0;

   foreach($transactions as $transaction) {
      $transaction_total += $transaction->getAmount();
   }

   echo 'Transactions Total: '.$transaction_total;
}

摇篮:

Error:(1, 1) A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.application']
   > Could not create plugin of type 'AppPlugin'.

1 个答案:

答案 0 :(得分:2)

检查您的成绩档案并在此处更新类路径版本:

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

}
}

尝试更改类路径版本,然后进行更新。 确保您已连接到互联网以进行gradle同步。

希望它对您有所帮助。

谢谢,

Bhuvnesh