Can't resolve R after updating Android Studio to v13

I got a problem while doing gradle after my android studio updated to version 1.3

So this is the error message

Error: Execution completed for task ': app: processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command' C: \ Users \ Otniel \ AppData \ Local \ Android \ sdk \ build-tools \ 22.0. 1 \ aapt.exe '' exited with non-zero exit value 1

I don't know what happened, but this is my approach to fix my error (which does not generate any working solution)

  • Change my build tools from project structure settings: compile sdk version: API 22: Android 5.1 build tools version 22.0.1 (gradle sync and error is still the same as above post)

Then I will proceed with the first setting (point 1) and add this second setting 2.change gradle 1.2.3 to classpath 'com.android.tools.build:gradle:1.3.0' (1.2.3 gives the same error as the message above) (since 1.3.0 still produce the same error)

  1. try to revert build tools in v 21 and android lolipop v 5 with combination of gradle: com.android.tools.build:gradle:1.3.0 and com.android.tools.build: gradle: 1.2.3

When I go back to 1.1.3 or 1.0.0 (for the gradle plugin) I still get the same error.

When I change gradle to 1.1.3 the console returns a message to use the version of the gradle plugin that matches the sdk build tools (v 24)

But every combination I use still returns an error message (still the same as the message above)

Also I tried to delete the implide folder and the .idea and reimport of the project still has the same error.

And my android studio cannot resolve the R character as an effect.

So what should I do to fix this?

[Changed] This is my gradle code:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion '21.1.2'

    defaultConfig {
        applicationId "com.vanwellis.vinnomobile"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.android.support:recyclerview-v7:21.0.0'
    compile 'com.android.support:support-v4:21'
    compile 'com.daimajia.easing:library:1.0.0@aar'
    compile 'com.daimajia.swipelayout:library:1.2.0@aar'
    compile 'commons-io:commons-io:2.4'
    compile 'com.daimajia.androidanimations:library:1.1.2@aar'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'jp.wasabeef:recyclerview-animators:1.0.3@aar'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
    compile 'com.google.code.gson:gson:2.3.1'
}

      

I got these 2 errors by looking closely at them: D: \ Projects \ Android \ MyProj \ app \ build \ intermediates \ res \ merged \ debug \ drawable-hdpi-v4 \ ic_launcher.png: error: Duplicate file. D: \ Projects \ Android \ MyProj \ app \ build \ intermediates \ res \ merged \ debug \ drawable-hdpi \ ic_launcher.png: Original here. A version specifier may be implied.

Perhaps my additional information is helpful

+3


source to share


1 answer


After updating Android Studio recently, I also had a problem. What worked for me was expanding res, then going through each child folder in res and expanding them (you can close them right after.)



Close all open classes and from the Control Panel select New > Make Project .

+2


source







All Articles