【发布时间】:2016-01-02 14:11:09
【问题描述】:
我正在尝试在我的 Android Studio 项目中使用 Android APK 扩展文件。我已按照官方网站上的说明进行操作:http://developer.android.com/google/play/expansion-files.html#Preparing
在 Android Studio 中,我有这两个模块:
其中一个模块的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')
}
但在尝试使用下载器服务中的任何内容时,我仍然收到此错误:
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
我该如何解决这个问题?
【问题讨论】:
-
aidl文件是否在正确的位置? (这在移动到 gradle 时发生了变化)。旁注:将所有模块中的appcompat-v7设为相同版本以进行整理 -
@Blundell 这个aidl 文件是什么?我在官方文档中找不到任何提及此文件的内容,请您指出正确的位置吗?
-
也许不是
aidl在看演示,尽管 logcat 暗示了它。 / 哦,等一下,如果您在没有 google 配置的模拟器或设备上运行,您知道您会收到该错误吗? 我认为
标签: android android-studio android-studio-import