4

This question have asked for several times and I follow those questions and tried to solve the problem. The project was successfully build and running I shut down my computer few hours ago. This problem is making me mad please help.

Message:

 Information:Gradle tasks [:app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources]
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAnimatedVectorDrawable2420Library UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72420Library UP-TO-DATE
    :app:prepareComAndroidSupportCardviewV72420Library UP-TO-DATE
    :app:prepareComAndroidSupportDesign2420Library UP-TO-DATE
    :app:prepareComAndroidSupportRecyclerviewV72420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCompat2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUi2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportCoreUtils2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportFragment2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportMediaCompat2420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportV42420Library UP-TO-DATE
    :app:prepareComAndroidSupportSupportVectorDrawable2420Library UP-TO-DATE
    :app:prepareDebugDependencies
    :app:compileDebugAidl UP-TO-DATE
    :app:compileDebugRenderscript UP-TO-DATE
    :app:generateDebugBuildConfig UP-TO-DATE
    :app:mergeDebugShaders
    Error:java.lang.NullPointerException (no error message)
    Information:BUILD FAILED
    Information:Total time: 1.422 secs
    Information:1 error
    Information:0 warnings
    Information:See complete output in console

build.gradle :

 apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion '24.0.0'

    defaultConfig {
        applicationId "np.com.yipl.yiplandroidlistme"
        minSdkVersion 15
        targetSdkVersion 24
        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:24.2.0'
    compile 'com.android.support:design:24.2.0'
    compile 'com.android.support:recyclerview-v7:24.2.0'
    compile 'com.android.support:cardview-v7:24.2.0'
    compile 'com.mcxiaoke.volley:library:1.0.19'
}

Please help .

Ngima Sherpa
  • 1,397
  • 1
  • 13
  • 34

5 Answers5

1

This is normally a gradle build problem, try updating your gradle version.

AMAN77
  • 6,218
  • 9
  • 45
  • 60
Oussema Aroua
  • 5,225
  • 1
  • 24
  • 44
0

I had a problem due to another package having installed which was creating clashes. As I uninstalled it, worked successfully.

I hope it would help someone else.

Mohammedsalim Shivani
  • 1,793
  • 3
  • 19
  • 30
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](http://stackoverflow.com/questions/ask). You can also [add a bounty](http://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question once you have enough [reputation](http://stackoverflow.com/help/whats-reputation). - [From Review](/review/low-quality-posts/14295018) – Nikhil Nov 17 '16 at 05:25
  • I had the same problem and tried a lot but when checked the logs, found some clashes with other application package though having no connection with it. So may someone else would also face the same problem then this solution would help. – Mohammedsalim Shivani Nov 17 '16 at 07:37
0

Just delete the .gradle folder from the project directory. Restart the Android Studio.

Note: .gradle folder is hidden in your Android Project Directory in MacOS. :)

OMi Shah
  • 5,768
  • 3
  • 25
  • 34
0

Add ndk.dir in local.properties

ndk.dir=C:\Users\fatsnake\AppData\Local\Android\Sdk\ndk\(version)

enter image description here

qs yu
  • 1
-1

Follow the step : 1. Close Your Android Studio 2. Go to YourProjects/.gradle 3. Delete .gradle folder 4. Again open Android Studio 5. Rebuild Your Project.

You are done .

Hanisha
  • 849
  • 10
  • 8