Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29772

error: package com.android.annotations does not exist

$
0
0

I have the following class

import com.android.annotations.NonNullByDefault;@NonNullByDefaultpublic final class Log {    ...}

and here is my build.gradle file (some parts omitted)

apply plugin: 'com.android.application'android {    compileSdkVersion 25    buildToolsVersion '24.0.1'    defaultConfig {        minSdkVersion 16        targetSdkVersion 25        versionCode 2        versionName "0.2"    }    compileOptions {        sourceCompatibility JavaVersion.VERSION_1_7        targetCompatibility JavaVersion.VERSION_1_7    }}dependencies {        compile 'com.android.support:appcompat-v7:25.0.0'    compile 'com.android.support:support-annotations:25.0.0'    compile 'com.android.support:design:25.0.0'}

In Android Studio there is no warning raised for my class

enter image description here

However when I try to build and run my app I get this error from gradle

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]Warning:[options] bootstrap class path not set in conjunction with -source 1.7/home/puter/git-repos/TaskManager3/app/src/main/java/com/treemetrics/taskmanager3/util/Log.javaError:(3, 31) error: package com.android.annotations does not existError:(7, 2) error: cannot find symbol class NonNullByDefaultError:Execution failed for task ':app:compileDebugJavaWithJavac'.> Compilation failed; see the compiler error output for details.Information:BUILD FAILEDInformation:Total time: 21.021 secsInformation:3 errorsInformation:1 warningInformation:See complete output in console

Viewing all articles
Browse latest Browse all 29772

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>