错误:(126,13)无法解决:com.opentok.android:opentok-android-sdk:2.9.+

时间:2017-03-19 05:14:44

标签: android opentok tokbox

我正在使用

的opentok库
public function postUploadAvatar(Request $request)
  try {
    // Do something with $request->get('avatar')
    // Maybe validate file, store, whatever.
  } catch (PostTooLargeException $e) {
    return 'File too large!';
  }
}

在我的build.gradle文件中添加了

    compile 'com.opentok.android:opentok-android-sdk:2.9.+'

但无法解决此错误

     maven {
        url  "http://tokbox.bintray.com/maven"
    }

当我试图清理项目时,我正在接受这个

    Error:(126, 13) Failed to resolve: com.opentok.android:opentok-android-sdk:2.9.+
    Show in File
    Show in Project Structure dialog

请帮我解决这个问题,谢谢。

2 个答案:

答案 0 :(得分:0)

使用 mavenCentral() 而不是 maven { url "http://tokbox.bintray.com/maven" }

答案 1 :(得分:-1)

我按照以下步骤解决了这个错误

     Go to File>New>New Module
     Select "Import .JAR/.AAR Package" and click next.
     Enter the path to .aar file and click finish.
     Go to File>Project Structure (Ctrl+Shift+Alt+S).
     Under "Modules," in left menu, select "app."
     Go to "Dependencies tab.
     Click the green "+" in the upper right corner.
     Select "Module Dependency"
     Select the new module from the list.

请将依赖版本与.aar文件相同。