Forum für diejenigen, die für Android programmieren
Anonymous
Mausklick oder andere Aktionen funktionieren nicht auf Emulator
Post
by Anonymous » 02 Feb 2025, 07:34
Ich habe gerade ein neues Projekt gestartet. Wenn ich den Emulator ausführe, wird er angezeigt, aber der Maus -Touch funktioniert nicht. Andere Ansichten. img alt = "Bildbeschreibung hier eingeben" src = "
https://i.static.net/jphqdxm2.jpg"/ >
Es scheint Diese Ausgaben. BR /> Dokument 'Hardware-Qemu.ini.lock' Dokument aus der AVD-Datei (es gab kein solches Dokument wie oben) < /li>
Computer, Android Studio neu starten, < /li> < Br /> < /ol>
-xml < /p>
Code: Select all
-MainActivity
package com.myapplication
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
< /code>
-gradle < /p>
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
compose_version = '1.1.0' //add
}
ext.kotlin_version = '1.8.22' //1.6.21 -> 1.6.10 -> 1.8.0 -> 1.8.22
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.8.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
// Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
< /code>
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdkVersion 35 //34->35
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.myapplication"
minSdkVersion 21 //16 -> 19 -> 21로 변경
targetSdkVersion 34
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'
}
namespace 'com.myapplication'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.15.0'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
< /code>
-manifest.xml
Wie könnte ich dieses Problem lösen?
1738478080
Anonymous
Ich habe gerade ein neues Projekt gestartet. Wenn ich den Emulator ausführe, wird er angezeigt, aber der Maus -Touch funktioniert nicht. Andere Ansichten. img alt = "Bildbeschreibung hier eingeben" src = "https://i.static.net/jphqdxm2.jpg"/> Es scheint Diese Ausgaben. BR /> Dokument 'Hardware-Qemu.ini.lock' Dokument aus der AVD-Datei (es gab kein solches Dokument wie oben) < /li> Computer, Android Studio neu starten, < /li> < Br /> < /ol> -xml < /p> [code] -MainActivity package com.myapplication import androidx.appcompat.app.AppCompatActivity import android.os.Bundle class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) } } < /code> -gradle < /p> // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { compose_version = '1.1.0' //add } ext.kotlin_version = '1.8.22' //1.6.21 -> 1.6.10 -> 1.8.0 -> 1.8.22 repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:8.8.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() mavenCentral() // Warning: this repository is going to shut down soon } } task clean(type: Delete) { delete rootProject.buildDir } < /code> plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdkVersion 35 //34->35 buildToolsVersion "30.0.3" defaultConfig { applicationId "com.myapplication" minSdkVersion 21 //16 -> 19 -> 21로 변경 targetSdkVersion 34 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' } namespace 'com.myapplication' } dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" implementation 'androidx.core:core-ktx:1.15.0' implementation 'androidx.appcompat:appcompat:1.7.0' implementation 'com.google.android.material:material:1.12.0' implementation 'androidx.constraintlayout:constraintlayout:2.2.0' testImplementation 'junit:junit:4.+' androidTestImplementation 'androidx.test.ext:junit:1.2.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1' } < /code> -manifest.xml [/code] Wie könnte ich dieses Problem lösen?
0 Replies
6 Views
Last post by Anonymous
23 Apr 2025, 09:36
Zoomen Sie mit CSS ein- und aus der Mausklick.
by
Anonymous »
06 Feb 2025, 08:51 » in
CSS
Ich möchte das Bild nur mit CSS zoomen. Der Code unten zoomiert das Bild, wenn die linke Taste der Maus gedrückt wird, aber ich möchte mit einem Mausklick ein- und auszoomen. Wie kann ich das...
0 Replies
10 Views
Last post by Anonymous
06 Feb 2025, 08:51
0 Replies
20 Views
Last post by Anonymous
06 Jan 2025, 07:07
0 Replies
10 Views
Last post by Guest
07 Jan 2025, 10:19
0 Replies
16 Views
Last post by Anonymous
15 Feb 2025, 07:35