com.google.protobuf.nano不存在

时间:2017-03-22 16:30:52

标签: android

尝试从源代码构建Launcher3,但它一直给我以下错误:

Error:(9, 31) error: package com.google.protobuf.nano does not exist

有任何帮助吗?

这是我的gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"

    defaultConfig {
        applicationId "com.android.launcher3"
        minSdkVersion 17
        targetSdkVersion 25
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v4:25.2.0'
    compile 'com.google.protobuf:protobuf-java:2.3.0'
}

1 个答案:

答案 0 :(得分:0)

apply plugin: 'com.google.protobuf'刚刚为我工作。我正在使用最新版本(截至今天),并且运行良好。