開發一個簡單實用的 本地音樂播放器

先看錯誤:

Android stduio 3.5.2

SDK 32

android 12

在 AS 中直接 運行報錯:

Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

解決的方法:
https://stackoverflow.com/questions/69345255/the-application-could-not-be-installed-install-parse-failed-manifest-malformed

修改 SDK 爲 30 ,在 AndroidManifest.xml 添加

 <activity android:name=".MainActivity" android:exported="true">

先看截圖:

 

清爽簡單的音樂播放器太少見了,不管是 XXX 音樂 還是 XX 音樂,都是又難用,又卡,還有廣告,聽個歌還要開會員。

只是想要一個本地的播放器,就那麼難嗎?所以,我就自己開發了一個,沒有采用任何第三方插件,完全原始的 API 開發。

也沒有任何多餘的功能,一個 頁面就搞定了。

功能清單:

1,掃描手機內存儲的音樂,生個一個目錄列表,並存儲,不用每次打開APP 都掃一次

2,播放列表 可以點擊選擇播放

3,上下首,暫停,播放,調進度條

4,播放模式:單曲、列表、全部

目前已經做好了這些,打算放 github ,想開發的可以一起。

本人非專業開發APP 的人員。

現已開源:

https://github.com/nejidev/MusicPlayer

一個 GITHUB 提交的問題。

$ git push origin master
Logon failed, use ctrl+c to cancel basic credential prompt.
Username for 'https://github.com': nejidev
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for 'https://github.com/nejidev/MusicPlayer.git/'

原因是現在已經不支持,那種直接輸入用戶名密碼的提交方式了,需要自己生成一對 公私鑰

ssh-keygen.exe

/c/Users/xxxx/.ssh/id_rsa.pub. 把生成的這個公鑰配置到 github 裏面

$ git remote set-url origin [email protected]:nejidev/MusicPlayer.git

切換協議爲 git 協議 ,在推送 就可以了。

$ git push
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
Enumerating objects: 65, done.
Counting objects: 100% (65/65), done.
Delta compression using up to 8 threads.
Compressing objects: 100% (47/47), done.
Writing objects: 100% (63/63), 77.38 KiB | 289.00 KiB/s, done.
Total 63 (delta 0), reused 0 (delta 0)
To github.com:nejidev/MusicPlayer.git
0f68b7f..8b70a99 master -> master

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章