【问题标题】:Setting up Spotify API in Android Studio在 Android Studio 中设置 Spotify API
【发布时间】:2021-08-24 14:03:57
【问题描述】:

我一直关注Spotify quick start guide,但在“添加应用远程 SDK”部分遇到问题。

When I try to import the module I get these options. 但我没有看到他们显示的“导入 .JAR/AAR 包”按钮。相反,我一直在点击“导入”,然后选择“app-remote-lib”文件夹。

然后我将此代码放在我的应用级 build.gradle 依赖项部分:

implementation project(':app-remote-lib')
implementation "com.google.code.gson:gson:2.8.5"

但是现在当我将我的依赖项添加到 MainActivity 中时,我只是得到红色文本告诉我"cannot resolve symbol 'spotify'"

有人可以帮帮我吗?我不确定如何让 spotify API 从现在开始工作。

【问题讨论】:

    标签: java android-studio spotify-app


    【解决方案1】:

    按照以下步骤进行

    
    1. delete the module, .idea folder, and then run an Invalidate Caches/Restart;
    2. before re-installing the module keep the implementation project(':spotify-app-remote') on your Gradle files;
    3. right-click on the app folder and choose New-> Module;
    4. choose import .jar/aar package (if you import the module via the file menu it will never work don't ask me why hahaha)
    5. rename the module name to :spotify-app-remote and hit finish;
    
    

    【讨论】:

      【解决方案2】:

      单击文件>新建>导入项目>然后从您下载的sdk的app-remote-lib文件夹中打开spotify-app-remote-release-0.7.2.aar文件

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2016-01-30
        • 1970-01-01
        • 2021-09-27
        • 1970-01-01
        • 1970-01-01
        • 2016-05-17
        • 2016-07-18
        相关资源
        最近更新 更多