1

我正在尝试在我的 Android Studio 项目中使用 Android APK 扩展文件。我已按照官方网站上的说明进行操作:http: //developer.android.com/google/play/expansion-files.html#Preparing

在 Android Studio 中,我有以下 2 个模块:

图片

其中一个模块的 build.gradle 文件(另一个类似):

apply plugin: 'com.android.library'
android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 23
        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:23.1.1'
}

repositories {
    "/Users/andro/Library/Android/sdk/extras/play_licensing"
}

在主项目的 build.gradle 文件中,我有以下依赖项:

dependencies {
compile project(':viewpagerindicator')
compile 'com.android.support:appcompat-v7:19.1.0'
compile files('libs/libGoogleAnalyticsServices.jar')
compile project(':googleplaylicenselibrary')
compile project(':playdownloaderlibrary')
}

但是在尝试使用 Downloader 服务中的任何内容时,我仍然会收到此错误:

Error:(35, 55) error: package com.google.android.vending.expansion.downloader does not exist
Error:(36, 55) error: package com.google.android.vending.expansion.downloader does not exist
Error:(48, 10) error: cannot find symbol class IDownloaderService
Error:(49, 10) error: cannot find symbol class IStub

我怎样才能解决这个问题?

4

1 回答 1

0

Android 接口定义语言 ( AIDL ) 文件可能位于错误的位置以查看您的错误消息。您需要浏览Gradle 插件用户指南以找出您的问题所在。当您阅读时,您将能够通过检查所需设置和您的设置之间的差异来确定我的猜测是否准确。即使我不正确,即使在这种情况下阅读指南也会帮助您开始。

于 2016-01-02T14:33:38.703 回答