我无法在Android项目中编译jwplayer,Android Studio v 3.0.1
minSdkVersion 19
targetSdkVersion 26
compileSdkVersion 26
Build.gradle
dependencies
compile 'com.longtailvideo.jwplayer:jwplayer-core:+'
compile 'com.longtailvideo.jwplayer:jwplayer-common:+'
消息
错误:无法解析':app @ flavorPublicDebug / compileClasspath'的依赖关系:无法解析com.longtailvideo.jwplayer:jwplayer-core:+。
Androidmanifest中定义的许可证密钥
适用于之前创建的其他项目
Gradle:
classpath 'com.android.tools.build:gradle:3.0.1'
存储库:
allprojects {
repositories {
jcenter()
maven {
url 'http://mvn.jwplayer.com/content/repositories/releases/'
}
google()
}
}
gradle任务:
Error:Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.longtailvideo.jwplayer:jwplayer-core:+.
Required by:
project :app
> Could not resolve com.longtailvideo.jwplayer:jwplayer-core:+.
> Failed to list versions for com.longtailvideo.jwplayer:jwplayer-core.
> Unable to load Maven meta-data from http://mvn.jwplayer.com/content/repositories/releases/com/longtailvideo/jwplayer/jwplayer-core/maven-metadata.xml.
> Could not HEAD 'http://mvn.jwplayer.com/content/repositories/releases/com/longtailvideo/jwplayer/jwplayer-core/maven-metadata.xml'.
> Connect to 127.0.0.1:50077 [/127.0.0.1] failed: Connection refused (Connection refused)
> Could not resolve com.longtailvideo.jwplayer:jwplayer-core:+.
> Failed to list versions for com.longtailvideo.jwplayer:jwplayer-core.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/longtailvideo/jwplayer/jwplayer-core/maven-metadata.xml.
> Could not get resource 'https://jcenter.bintray.com/com/longtailvideo/jwplayer/jwplayer-core/maven-metadata.xml'.
> Could not GET 'https://jcenter.bintray.com/com/longtailvideo/jwplayer/jwplayer-core/maven-metadata.xml'.
> Connect to 127.0.0.1:50077 [/127.0.0.1] failed: Connection refused (Connection refused)
> Could not resolve com.longtailvideo.jwplayer:jwplayer-core:+.
> Failed to list versions for com.longtailvideo.jwplayer:jwplayer-core.
> Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/com/longtailvideo/jwplayer/jwplayer-core/maven-metadata.xml.
> Could not HEAD 'https://dl.google.com/dl/android/maven2/com/longtailvideo/jwplayer/jwplayer-core/maven-metadata.xml'.
> Connect to 127.0.0.1:50077 [/127.0.0.1] failed: Connection refused (Connection refused)
> Could not resolve com.longtailvideo.jwplayer:jwplayer-common:+.
Required by:
project :app
> Could not resolve com.longtailvideo.jwplayer:jwplayer-common:+.
> Failed to list versions for com.longtailvideo.jwplayer:jwplayer-common.
> Unable to load Maven meta-data from http://mvn.jwplayer.com/content/repositories/releases/com/longtailvideo/jwplayer/jwplayer-common/maven-metadata.xml.
> Could not HEAD 'http://mvn.jwplayer.com/content/repositories/releases/com/longtailvideo/jwplayer/jwplayer-common/maven-metadata.xml'.
> Connect to 127.0.0.1:50077 [/127.0.0.1] failed: Connection refused (Connection refused)
> Could not resolve com.longtailvideo.jwplayer:jwplayer-common:+.
> Failed to list versions for com.longtailvideo.jwplayer:jwplayer-common.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/longtailvideo/jwplayer/jwplayer-common/maven-metadata.xml.
> Could not get resource 'https://jcenter.bintray.com/com/longtailvideo/jwplayer/jwplayer-common/maven-metadata.xml'.
> Could not GET 'https://jcenter.bintray.com/com/longtailvideo/jwplayer/jwplayer-common/maven-metadata.xml'.
> Connect to 127.0.0.1:50077 [/127.0.0.1] failed: Connection refused (Connection refused)
> Could not resolve com.longtailvideo.jwplayer:jwplayer-common:+.
> Failed to list versions for com.longtailvideo.jwplayer:jwplayer-common.
> Unable to load Maven meta-data from https://dl.google.com/dl/android/maven2/com/longtailvideo/jwplayer/jwplayer-common/maven-metadata.xml.
> Could not HEAD 'https://dl.google.com/dl/android/maven2/com/longtailvideo/jwplayer/jwplayer-common/maven-metadata.xml'.
> Connect to 127.0.0.1:50077 [/127.0.0.1] failed: Connection refused (Connection refused)
我如何解决?
build.gradle app:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.asemanltd.app.shabakema"
minSdkVersion 19
targetSdkVersion 26
versionCode 5000
versionName '0.5.0'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
/*flavorDimensions 'public'
productFlavors {
flavorPublic {
dimension 'public'
minSdkVersion 19
applicationId 'com.asemanltd.app.shabakema'
targetSdkVersion 26
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
versionCode 5000
versionName '0.5.0'
}
}*/
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
testImplementation 'junit:junit:4.12'
//noinspection GradleCompatible
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.android.support:appcompat-v7:26.1.0'
// implementation 'com.android.support.constraint:constraint-laljyout:1.0.2'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
// JW player
compile 'com.longtailvideo.jwplayer:jwplayer-core:+'
compile 'com.longtailvideo.jwplayer:jwplayer-common:+'
// Material Dialog
compile 'com.afollestad.material-dialogs:commons:0.9.6.0'
// Glide
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.bumptech.glide:okhttp-integration:1.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0'
compile 'jp.wasabeef:glide-transformations:2.0.1'
// Fast Android Networking
compile 'com.amitshekhar.android:android-networking:1.0.0'
// Video Trimmer
compile 'life.knowledge4:k4l-video-trimmer:1.0'
// Yoyo Animation
compile 'com.daimajia.easing:library:2.1@aar'
compile 'com.daimajia.androidanimations:library:2.3@aar'
// Media Picker To Pick Photos And Videos Up
implementation project(':mediapicker')
}
build.gradle项目:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'http://mvn.jwplayer.com/content/repositories/releases/'
}
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}