Nach einem Update, das ich am 27-03-2018 vorgenommen habe, schlägt meine Synchronisierung fehl. Ich erhalte den Fehler
Could not find org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2.
Ich poste meine Abschlussdateien unten. Ich habe versucht, das Projekt zu reinigen und wieder aufzubauen, aber es funktioniert immer noch nicht.
Projektlevel Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
}
dependencies {
classpath 'com.Android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.loopj.Android:android-async-http:1.4.9'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Grad der App-Ebene
apply plugin: 'com.Android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
buildscript {
dependencies {
classpath 'com.Android.tools.build:gradle:3.0.1'
}
}
Android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId 'app.myapp.com'
minSdkVersion 15
targetSdkVersion 25
versionCode 33
versionName "1.1.30"
useLibrary 'org.Apache.http.legacy'
// Enabling multidex support.
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
dexOptions {
preDexLibraries = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-Android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
lintOptions {
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public'
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':Android-async-http-1.4.9')
// compile 'com.daimajia.androidanimations:library:[email protected]'
compile project(':PayTabs_SDK_NOSCAN')
compile('com.Twitter.sdk.Android:Twitter:[email protected]') {
transitive = true;
}
compile('org.Apache.httpcomponents:httpmime:4.3') {
exclude module: "httpclient"
}
compile files('libs/signpost-core-1.2.1.2.jar')
// Discovery and Outlook services
compile('com.Microsoft.services:discovery-services:[email protected]') {
transitive = true
}
compile('com.Microsoft.services:Outlook-services:[email protected]') {
transitive = true
}
compile 'org.sufficientlysecure:html-textview:3.3'
compile 'com.Android.support:appcompat-v7:25.3.1'
compile 'com.Android.support:design:25.3.1'
compile 'com.Android.support:support-v4:25.3.1'
compile 'cz.msebera.Android:httpclient:4.3.6'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:[email protected]'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
compile 'com.google.Android.gms:play-services:9.0.0'
compile 'com.Android.support:multidex:1.0.1'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.google.Android.gms:play-services-ads:9.0.0'
compile 'com.google.Android.gms:play-services-auth:9.0.0'
compile 'com.google.Android.gms:play-services-gcm:9.0.0'
compile 'org.codepond:wizardroid:1.3.1'
compile 'com.facebook.Android:facebook-Android-sdk:4.0.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.zxing:core:3.2.0'
compile 'io.card:Android-sdk:5.3.0'
compile 'com.google.firebase:firebase-messaging:9.0.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'me.dm7.barcodescanner:zbar:1.8.2'
compile 'com.journeyapps:zxing-Android-embedded:[email protected]'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.cloudrail:cloudrail-si-Android:2.11.0'
compile 'org.Apache.httpcomponents:httpclient-Android:4.3.5.1'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
compile 'com.Android.support.constraint:constraint-layout:1.0.2'
compile 'com.Android.support:recyclerview-v7:25.3.1'
compile 'com.ss.bannerslider:bannerslider:1.8.0'
compile 'com.marshalchen.ultimaterecyclerview:library:0.7.3'
// compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7"
testCompile 'junit:junit:4.12'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.Android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
Ich habe alles versucht, was ich weiß, aber im Moment funktioniert nichts. Android Studio und Gradle werden auf die neueste Version aktualisiert. Die App funktionierte vor dem Update. Ich habe die Anweisungen in developer.Android.com über die Migration von Migrationen befolgt, aber dort wird nichts erwähnt, was mir bei dem Problem helfen könnte.
Ich poste den Fehler, den ich hier bekomme
Could not find org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2.
Searched in the following locations:
https://maven.fabric.io/public/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom
https://maven.fabric.io/public/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.jar
https://dl.google.com/dl/Android/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom
https://dl.google.com/dl/Android/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.jar
Required by:
project :app > com.Android.tools.build:gradle:3.0.1 > com.Android.tools.build:gradle-core:3.0.1
project :app > com.Android.tools.build:gradle:3.0.1 > com.Android.tools.build:gradle-core:3.0.1 > com.Android.tools.build:builder:3.0.1
project :app > com.Android.tools.build:gradle:3.0.1 > com.Android.tools.build:gradle-core:3.0.1 > com.Android.tools.lint:lint:26.0.1
project :app > com.Android.tools.build:gradle:3.0.1 > com.Android.tools.build:gradle-core:3.0.1 > com.Android.tools.build:builder:3.0.1 > com.Android.tools:sdk-common:26.0.1
project :app > com.Android.tools.build:gradle:3.0.1 > com.Android.tools.build:gradle-core:3.0.1 > com.Android.tools.build:builder:3.0.1 > com.Android.tools:sdklib:26.0.1 > com.Android.tools:repository:26.0.1
project :app > com.Android.tools.build:gradle:3.0.1 > com.Android.tools.build:gradle-core:3.0.1 > com.Android.tools.lint:lint:26.0.1 > com.Android.tools.lint:lint-checks:26.0.1 > com.Android.tools.lint:lint-api:26.0.1
auch ich kam mit dem gleichen Problem auf. Es scheint, als würde Android Studio das Kotlin-Plugin aktualisieren.
gehen Sie zu Tools> Kotlin> Configure Kotlin Plugin Update und aktualisieren Sie das Plugin.
Ich habe die Antwort gefunden. Ich habe die Versionen von Gradle-Plugins geändert. Ich füge unten meine Gradle-Dateien hinzu
Projektebene
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.Android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:3.1.1'
classpath 'com.loopj.Android:android-async-http:1.4.9'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Build-Level-Datei auf App-Ebene
apply plugin: 'com.Android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.Android.tools.build:gradle:3.0.1'
}
}
Android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId 'app.ecopon.com'
minSdkVersion 15
targetSdkVersion 25
versionCode 33
versionName "1.1.30"
useLibrary 'org.Apache.http.legacy'
// Enabling multidex support.
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
dexOptions {
preDexLibraries = false
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-Android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
lintOptions {
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public'
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':Android-async-http-1.4.9')
// compile 'com.daimajia.androidanimations:library:[email protected]'
compile project(':PayTabs_SDK_NOSCAN')
compile('com.Twitter.sdk.Android:Twitter:[email protected]') {
transitive = true;
}
compile('org.Apache.httpcomponents:httpmime:4.3') {
exclude module: "httpclient"
}
compile files('libs/signpost-core-1.2.1.2.jar')
// Discovery and Outlook services
compile('com.Microsoft.services:discovery-services:[email protected]') {
transitive = true
}
compile('com.Microsoft.services:Outlook-services:[email protected]') {
transitive = true
}
compile 'org.sufficientlysecure:html-textview:3.3'
compile 'com.Android.support:appcompat-v7:25.3.1'
compile 'com.Android.support:design:25.3.1'
compile 'com.Android.support:support-v4:25.3.1'
compile 'cz.msebera.Android:httpclient:4.3.6'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:[email protected]'
compile 'me.dm7.barcodescanner:zxing:1.8.4'
compile 'com.google.Android.gms:play-services:9.0.0'
compile 'com.Android.support:multidex:1.0.1'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.google.Android.gms:play-services-ads:9.0.0'
compile 'com.google.Android.gms:play-services-auth:9.0.0'
compile 'com.google.Android.gms:play-services-gcm:9.0.0'
compile 'org.codepond:wizardroid:1.3.1'
compile 'com.facebook.Android:facebook-Android-sdk:4.0.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.google.zxing:core:3.2.0'
compile 'io.card:Android-sdk:5.3.0'
compile 'com.google.firebase:firebase-messaging:9.0.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'me.dm7.barcodescanner:zbar:1.8.2'
compile 'com.journeyapps:zxing-Android-embedded:[email protected]'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.cloudrail:cloudrail-si-Android:2.11.0'
compile 'org.Apache.httpcomponents:httpclient-Android:4.3.5.1'
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0'
compile 'com.Android.support.constraint:constraint-layout:1.0.2'
compile 'com.Android.support:recyclerview-v7:25.3.1'
compile 'com.ss.bannerslider:bannerslider:1.8.0'
compile 'com.marshalchen.ultimaterecyclerview:library:0.7.3'
compile 'com.github.barteksc:Android-pdf-viewer:2.8.2'
testCompile 'junit:junit:4.12'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.Android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
Jetzt funktioniert alles perfekt
Eine Lösung dafür gefunden. Sie müssen google () zum Repository-Abschnitt buildscript und allprojects wie folgt hinzufügen:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.Android.tools.build:gradle:3.1.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
1- Gehen Sie zu http://services.gradle.org
2- Gehen Sie zu Distributionen
3- Klicken Sie auf den neuesten Download, um ihn herunterzuladen (ich habe "gradle-4.6-rc-2-all.Zip" heruntergeladen).
4- Entpacken oder extrahieren Sie es
5- Gehen Sie in Android Studio zu Datei> Einstellungen> Erstellen, Ausführen, Bereitstellung> Gradle> Lokale Verteilung verwenden> und wählen Sie dann die Datei (die Sie gerade herunterladen und entpacken) von Ihrem Computer aus
6- Klicken Sie auf OK
7- Inside "build.gradle (Module: app)" stellen Sie sicher, dass compileSdkVersion und targetSdkVersion identisch sind
8- Klicken Sie auf Jetzt synchronisieren
Ressource: https://www.youtube.com/watch?v=q_qWUQNbFLY
Ändern Sie Ihren Buildscript-Teil Ihres build.gradle. Dazu entfernen Sie google () und jcenter (). Das hat für mich funktioniert.
buildscript {
repositories {
maven { url 'https://jitpack.io' }
mavenCentral()
maven { url "https://maven.google.com" }
}
dependencies {
classpath 'com.Android.tools.build:gradle:3.1.0'
}
}
Versuchen Sie, den Cache zu deaktivieren (einige Male gemacht) oder Studio neu zu installieren, oder überprüfen Sie, ob gradle-wrapper.properties distributionUrl folgendermaßen aussehen sollte:
distributionUrl = https: //services.gradle.org/distributions/gradle-4.4-all.Zip
Sie könnten versuchen, Ihre Kotlin-Version zu aktualisieren, und möglicherweise dem Repository-Tag allProjects https://maven.google.com hinzufügen.
Ihr Projektlevel build.gradle sollte danach ungefähr so aussehen:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.Android.tools.build:gradle:3.1.0'
classpath 'com.google.gms:google-services:3.1.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.loopj.Android:android-async-http:1.4.9'
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://jitpack.io' }
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Versuchen Sie außerdem, das Projekt zu bereinigen und möglicherweise Ihre .gradle
-Ordner manuell zu entfernen