我下载Android Studio - 北极狐| 2020.3.1 来自他们在我的 ubuntu 20.04 LTS 中的官方网站。
我的安装过程:
我下载了 zip 文件并解压。我 cd 进入 /bin/ 目录并使用 ./studio.sh 命令执行studio.sh文件。安装已经完成,但现在我遇到了很多问题。
我想完全卸载它而不改变任何东西,但不知道如何。如果有人能帮助我,我会很高兴。
完成后如何再次播放相同的音频?现在我将这段代码与 AVPlayer 一起使用:
fileprivate func play () {
guard let url = URL(string: record.recordUrl) else { return }
let playItem = AVPlayerItem(url: url)
player.replaceCurrentItem(with: playItem)
NotificationCenter.default.addObserver(self, selector: #selector(playerDidFinishPlaying), name: NSNotification.Name.AVPlayerItemDidPlayToEndTime, object: playItem)
player.play()
}
@objc func playerDidFinishPlaying(note: NSNotification) {
print("Player finished")
currentTimeSlider.setValue(0, animated: true)
currentTimeLabel.text = "00:00"
}
Run Code Online (Sandbox Code Playgroud) 我正在 Android Studio 上安装最新的插件 MAD 记分卡。当我启动它时,它显示以下错误:
MAD 记分卡生成期间出错:生成疯狂记分卡时出现错误 java.net.UnknownHostException: madscorecard.withgoogle.com

我尝试添加 openweather api,当我尝试同步文件时,build.gradle会弹出此错误
未指定compileSdkVersion。请将其添加到build.gradle
我的文件:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.myapplication'
compileSdk 33
defaultConfig {
applicationId "com.example.myapplication"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
}
Run Code Online (Sandbox Code Playgroud)
我已经定义了 CompileSDK,所以不知道为什么仍然会弹出这个问题。
Android 10我在&上使用 Futronic 指纹 USB 设备时遇到问题11。代码
intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)
Run Code Online (Sandbox Code Playgroud)
当我按权限对话框上的“确定”按钮时,总是返回 false。我有一台旧的 Android 5 设备,运行正常。
这是来自他们的 SDK 的代码(UsbDeviceDataExchangeImpl.java),作为 Android Studio 的模块包含在内
intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false)
Run Code Online (Sandbox Code Playgroud)
Android 10外部11USB 设备是否有任何额外的权限设置?
谢谢。
如何在 Java 17(或类似版本)中创建数组或函数列表?
预期的假设用途:
var myListOfFunctions = List.of(this::myFunction, MyClass::someOtherFunction);
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
对象不是函数式接口
我打算流式传输这些函数并向它们传递相同的数据。
android ×4
java ×2
android-usb ×1
avplayer ×1
fingerprint ×1
gradle ×1
java-17 ×1
kotlin ×1
list ×1
swift ×1
ubuntu ×1
ubuntu-20.04 ×1