Android Studio midi合成器编译错误,协议缓冲区

时间:2015-08-03 11:16:25

标签: android protocol-buffers midi synthesizer

我使用git:

下载了midi合成器库

git clone https://code.google.com/p/music-synthesizer-for-android/

在android studio中,我将其添加为模块,并将模块类型更改为build.gradle文件中的库。 我安装了Google Protocol Buffers Plugin,指定了输出文件夹,然后重新启动了Android Studio。 构建项目会导致以下错误。

Information:Gradle tasks [:app:compileDebugSources, :app:compileDebugTestSources, :musicSynthesizer:compileDebugSources, :musicSynthesizer:compileDebugTestSources]
WARNING [Project: :musicSynthesizer] Current NDK support is deprecated.  Alternative will be provided in the future.
:app:preBuild
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:musicSynthesizer:compileLint
:musicSynthesizer:copyReleaseLint UP-TO-DATE
:musicSynthesizer:mergeReleaseProguardFiles UP-TO-DATE
:musicSynthesizer:preBuild
:musicSynthesizer:preReleaseBuild
:musicSynthesizer:checkReleaseManifest
:musicSynthesizer:prepareReleaseDependencies
:musicSynthesizer:compileReleaseAidl UP-TO-DATE
:musicSynthesizer:compileReleaseRenderscript UP-TO-DATE
:musicSynthesizer:generateReleaseBuildConfig UP-TO-DATE
:musicSynthesizer:generateReleaseAssets UP-TO-DATE
:musicSynthesizer:mergeReleaseAssets UP-TO-DATE
:musicSynthesizer:generateReleaseResValues UP-TO-DATE
:musicSynthesizer:generateReleaseResources UP-TO-DATE
:musicSynthesizer:packageReleaseResources UP-TO-DATE
:musicSynthesizer:processReleaseManifest UP-TO-DATE
:musicSynthesizer:processReleaseResources UP-TO-DATE
:musicSynthesizer:generateReleaseSources UP-TO-DATE
:musicSynthesizer:compileReleaseJava
C:\Users\Prototype\Documents\GitHub\tempest-android\musicSynthesizer\src\main\java\com\levien\synthesizer\core\music\EventComparator.java
Error:(21, 47) error: package com.levien.synthesizer.core.music.Music does not exist
Error:(30, 28) error: cannot find symbol class EventOrBuilder
Error:(57, 28) error: cannot find symbol class EventOrBuilder
C:\Users\Prototype\Documents\GitHub\tempest-android\musicSynthesizer\src\main\java\com\levien\synthesizer\core\music\ScorePlayer.java
Error:(27, 47) error: package com.levien.synthesizer.core.music.Music does not exist
Error:(28, 47) error: package com.levien.synthesizer.core.music.Music does not exist
Error:(49, 56) error: package Event does not exist
Error:(76, 41) error: cannot find symbol class Score
Error:(239, 55) error: package Event does not exist
Error:(239, 23) error: package Event does not exist
Error:(288, 29) error: package Event does not exist
Error:(289, 30) error: package Event does not exist
C:\Users\Prototype\Documents\GitHub\tempest-android\musicSynthesizer\src\main\java\com\levien\synthesizer\core\model\composite\MultiTouchSynthesizer.java
Error:(32, 59) error: package com.levien.synthesizer.core.model.composite.Presets does not exist
Error:(33, 59) error: package com.levien.synthesizer.core.model.composite.Presets does not exist
Error:(34, 59) error: package com.levien.synthesizer.core.model.composite.Presets does not exist
Error:(160, 42) error: cannot find symbol class Setting
Error:(161, 42) error: cannot find symbol class Setting
Error:(162, 42) error: cannot find symbol class Setting
Error:(163, 42) error: cannot find symbol class Setting
Error:(207, 47) error: cannot find symbol class Setting
Error:(208, 47) error: cannot find symbol class Setting
Error:(209, 47) error: cannot find symbol class Setting
Error:(290, 44) error: cannot find symbol class Setting
Error:(291, 44) error: cannot find symbol class Setting
Error:(292, 44) error: cannot find symbol class Setting
Error:(293, 44) error: cannot find symbol class Setting
Error:(294, 44) error: cannot find symbol class Setting
Error:(295, 44) error: cannot find symbol class Setting
Error:(296, 44) error: cannot find symbol class Setting
Error:(297, 44) error: cannot find symbol class Setting
Error:(442, 47) error: cannot find symbol class Setting
Error:(452, 41) error: cannot find symbol class Setting
Error:(545, 25) error: cannot find symbol class Preset
Error:(606, 26) error: cannot find symbol class PresetLibrary
Error:(618, 15) error: cannot find symbol class Setting
Error:(619, 15) error: cannot find symbol class Setting
Error:(637, 11) error: cannot find symbol class PresetLibrary
Error:(71, 16) error: cannot find symbol variable PresetLibrary
Error:(73, 38) error: cannot find symbol class Setting
Error:(74, 35) error: cannot find symbol class Setting
Error:(85, 52) error: cannot find symbol variable Setting
Error:(86, 52) error: cannot find symbol variable Setting
Error:(87, 52) error: cannot find symbol variable Setting
Error:(88, 52) error: cannot find symbol variable Setting
Error:(89, 52) error: cannot find symbol variable Setting
Error:(90, 52) error: cannot find symbol variable Setting
Error:(91, 52) error: cannot find symbol variable Setting
Error:(92, 52) error: cannot find symbol variable Setting
Error:(99, 52) error: cannot find symbol variable Setting
Error:(100, 52) error: cannot find symbol variable Setting
Error:(101, 52) error: cannot find symbol variable Setting
Error:(102, 52) error: cannot find symbol variable Setting
Error:(103, 52) error: cannot find symbol variable Setting
Error:(104, 52) error: cannot find symbol variable Setting
Error:(105, 52) error: cannot find symbol variable Setting
Error:(106, 52) error: cannot find symbol variable Setting
Error:(115, 28) error: cannot find symbol variable Setting
Error:(128, 47) error: cannot find symbol variable Setting
Error:(129, 47) error: cannot find symbol variable Setting
Error:(130, 47) error: cannot find symbol variable Setting
Error:(131, 47) error: cannot find symbol variable Setting
Error:(133, 28) error: cannot find symbol variable Setting
Error:(189, 28) error: cannot find symbol variable Setting
Error:(190, 25) error: cannot find symbol variable Setting
Error:(191, 47) error: cannot find symbol variable Setting
Error:(192, 47) error: cannot find symbol variable Setting
Error:(193, 47) error: cannot find symbol variable Setting
Error:(194, 47) error: cannot find symbol variable Setting
Error:(243, 28) error: cannot find symbol variable Setting
Error:(244, 28) error: cannot find symbol variable Setting
Error:(245, 28) error: cannot find symbol variable Setting
Error:(246, 28) error: cannot find symbol variable Setting
Error:(247, 28) error: cannot find symbol variable Setting
Error:(248, 28) error: cannot find symbol variable Setting
Error:(249, 28) error: cannot find symbol variable Setting
Error:(250, 28) error: cannot find symbol variable Setting
Error:(251, 28) error: cannot find symbol variable Setting
Error:(363, 28) error: cannot find symbol variable Setting
Error:(364, 28) error: cannot find symbol variable Setting
Error:(365, 25) error: cannot find symbol variable Setting
Error:(367, 47) error: cannot find symbol variable Setting
Error:(368, 47) error: cannot find symbol variable Setting
Error:(369, 47) error: cannot find symbol variable Setting
Error:(370, 47) error: cannot find symbol variable Setting
Error:(390, 28) error: cannot find symbol variable Setting
Error:(391, 28) error: cannot find symbol variable Setting
Error:(393, 53) error: cannot find symbol variable Setting
Error:(394, 53) error: cannot find symbol variable Setting
Error:(395, 53) error: cannot find symbol variable Setting
Error:(396, 53) error: cannot find symbol variable Setting
Error:(423, 28) error: cannot find symbol variable Setting
Error:(424, 28) error: cannot find symbol variable Setting
Error:(434, 28) error: cannot find symbol variable Setting
C:\Users\Prototype\Documents\GitHub\tempest-android\musicSynthesizer\src\main\java\com\levien\synthesizer\core\model\composite\MultiChannelSynthesizer.java
Error:(25, 27) error: package com.google.protobuf does not exist
Error:(30, 59) error: package com.levien.synthesizer.core.model.composite.Presets does not exist
Error:(31, 59) error: package com.levien.synthesizer.core.model.composite.Presets does not exist
Error:(86, 5) error: cannot find symbol class Setting
Error:(86, 23) error: cannot find symbol variable Setting
Error:(117, 18) error: package PresetLibrary does not exist
Error:(117, 37) error: cannot find symbol variable PresetLibrary
Error:(118, 5) error: cannot find symbol variable TextFormat
Error:Execution failed for task ':musicSynthesizer:compileReleaseJava'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED
Information:Total time: 5.804 secs
Information:101 errors
Information:0 warnings
Information:See complete output in console

我应该如何更改以成功构建项目?

1 个答案:

答案 0 :(得分:1)

音乐合成器是库还是独立应用?他们的“入门”页面上的说明使它看起来像是后者。

您看到的具体错误是因为原始编译器没有将包中的* .proto文件编译到生成的Java表单中,因此抱怨的* .java类无法找到它们。关于他们失踪