Ich schrieb eine Bibliothek und versuchte, eine Graddle-Abhängigkeit in dem Projekt einzurichten. Auf einer Lektion von dieser Website gemacht: http://inthecheesefactory.com/blog/how-to-upload-library-to-jcenter-maven-central-as-dependency/en
Alles lief gut, auf der Website registriert, erstellen Sie ein Repository erstellt und gespeichert Schlüssel. Aber als er zu den Dateien in dem Projekt wechselte, waren Fehler.
Im Folgenden sind die Screenshots:
Version selbst über die Website erstellt
Mein Projekt gradle Datei:Versuchen Sie, Bibliothek hinzuzufügen,
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.4'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
// Plugin used to upload authenticated files to BinTray through Gradle
plugins {
id "com.jfrog.bintray" version "1.5"
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Meine Bibliothek gradle Datei:
apply plugin: 'com.android.library'
ext {
bintrayRepo = 'maven'
bintrayName = 'AnimLib'
publishedGroupId = 'diplom.itis.animationlib'
libraryName = 'animlib'
artifact = 'animlib'
libraryDescription = ''
siteUrl = 'https://github.com/metalink94/AnimationLib'
gitUrl = 'https://github.com/metalink94/AnimationLib.git'
libraryVersion = '0.9.0'
developerId = 'metalink94'
developerName = 'Denis'
developerEmail = '[email protected]'
licenseName = 'The Apache Software License, Version 2.0'
licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
allLicenses = ["Apache-2.0"]
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
group = 'diplom.itis.animationlib' // Change this to match your package name
version = '0.9.0' // Change this to match your version number
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.android.library'
}
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
Meine app Modul gradle Datei:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "diplom.itis.animationlib"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.github.clans:fab:1.6.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.github.wangjiegulu:AndroidInject:1.0.6'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.alexvasilkov:android-commons:1.2.4'
compile 'diplom.itis.animationlib:animlib:0.9.0'
//compile project(':animlib')
}
An d mein Fehler, wenn ich versuche, Synchronisierung Gradle:
Bitte jemand mir helfen, mir sagen, wo ich Fehler bekomme?
UPDATE
Ich habe nicht, was Sie (Fondesa) unten unterstreichen
ich meine Frage aktualisieren, kann ich nicht finden, was Sie im Grunde left..in mein Paket – metalink
@metalink öffnen Sie Ihre 0.9.0 Bibliothek auf Bintray und gehen Sie auf „Dateien“ Registerkarte Navigieren in Ordnern unterstreichen, finden Sie eine Datei mit der Erweiterung ".pom"? –