简体   繁体   English

简单的驱动器构建失败

[英]Trivial Drive Build Fail

I have imported trivial drive and the build is failing..我已经导入了微不足道的驱动器,但构建失败了..

Messages below..下面留言..

Error:Execution failed for task ':app:compileDebugAidl'.错误:任务 ':app:compileDebugAidl' 的执行失败。

java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing 'C:\\Users\\Conner\\AppData\\Local\\Android\\Sdk\\build-tools\\23.0.0\\aidl.exe' with arguments {-pC:\\Users\\Conner\\AppData\\Local\\Android\\Sdk\\platforms\\android-23\\framework.aidl -oC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\build\\generated\\source\\aidl\\debug -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\src\\main\\aidl -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\src\\debug\\aidl -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.0.0\\aidl -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\build\\intermediates\\exploded-aar\\com.android.support\\support-v4\\23.0.0\\aidl -dC:\\Users\\Conner\\AppData\\Local\\Temp\\aidl2318381263201294414.d C:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\src\\main\\aidl\\gersbach\\android\\vending\\billing\\IInAppBillingService.aidl} java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while execution 'C:\\Users\\Conner\\AppData\\Local\\Android\\Sdk\\build-tools\\23.0.0\\aidl.exe'参数 {-pC:\\Users\\Conner\\AppData\\Local\\Android\\Sdk\\platforms\\android-23\\framework.aidl -oC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\build\\generated\\source\\aidl\\debug -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\src\\main\\aidl -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\src\\debug\\aidl -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\ app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.0.0\\aidl -IC:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\build\\intermediates\\exploded-aar\\com.android .support\\support-v4\\23.0.0\\aidl -dC:\\Users\\Conner\\AppData\\Local\\Temp\\aidl2318381263201294414.d C:\\Users\\Conner\\AndroidStudioProjects\\TrivialDrive4\\app\\src\\main\\aidl\\gersbach\\ android\\vending\\billing\\IInAppBillingService.aidl}

App module gradle file应用模块gradle文件

compileSdkVersion 23
buildToolsVersion '23.0.0'

defaultConfig {
    applicationId "com.example.android.trivialdrivesample"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 7
    versionName "1.5"
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        // TODO(developer): uncomment below once config above is complete and uncommented.
        // signingConfig signingConfigs.release
    }
}

} }

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.0.0' }依赖{编译文件树(包括:['*.jar'],目录:'libs')testCompile'junit:junit:4.12'编译'com.android.support:appcompat-v7:23.0.0'}

Not sure whats going on.不知道发生了什么。 I have tried to used all build tools.. I have replaced my base64publickey with the one provided.我已经尝试使用所有构建工具。我已经用提供的那个替换了我的 base64publickey。 And I have changed my 'com' package name.我已经更改了我的“com”包名称。 I cannot generate an apk due to this build fail.由于此构建失败,我无法生成 apk。

Thanks in advance!!提前致谢!!

If you follow the official guide ( https://developer.android.com/google/play/billing/billing_integrate.html#billing-add-aidl ) it tells you to copy-paste the IInAppBillingService.aidl into your project using Android Studio, however that won't work - it will be pasted into the wrong directory.如果您遵循官方指南( https://developer.android.com/google/play/billing/billing_integrate.html#billing-add-aidl ),它会告诉您使用 Android Studio 将IInAppBillingService.aidl复制粘贴到您的项目中,但是这不起作用 - 它将被粘贴到错误的目录中。

Use your file browser and copy-paste the IInAppBillingService.aidl into <yourProject>/app/src/main/aidl/com/android/vending/billing/ .使用您的文件浏览器并将IInAppBillingService.aidl复制粘贴到<yourProject>/app/src/main/aidl/com/android/vending/billing/ IInAppBillingService.aidl <yourProject>/app/src/main/aidl/com/android/vending/billing/ Then, rebuild the project and it should work fine.然后,重建项目,它应该可以正常工作。

have you set this permission?你设置这个权限了吗?

<uses-permission android:name="com.android.vending.BILLING" />

and have your aidl package under main package?并将您的 aidl 包放在主包下?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM