Questions tagged «android»

Android是Google的移动操作系统,用于对数字设备(智能手机,平板电脑,汽车,电视,Wear,Glass和IoT)进行编程或开发。对于与Android相关的主题,请使用特定于Android的标签,例如android-intent,android-activity,android-adapter等。对于与开发或编程无关但与Android框架相关的问题,请使用以下链接:https:// android.stackexchange.com。

11
transformClassesAndResourcesWithProguardForRelease失败
我正在尝试在控制台中使用Gradle构建我的Android应用程序。但是遇到有关任务':app:transformClassesAndResourcesWithProguardForRelease'的错误: build.gradle: buildscript { repositories { jcenter() maven { url "https://jitpack.io" } } dependencies { classpath 'com.android.tools.build:gradle:2.2.3' classpath 'com.google.gms:google-services:3.0.0' } } allprojects { repositories { jcenter() maven { url "https://jitpack.io" } } } task clean(type: Delete) { delete rootProject.buildDir } app / build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 24 …

4
ProGuard:库类的重复定义?
我为我的Android项目运行ProGuard,并收到以下警告: Note: duplicate definition of library class [org.apache.http.conn.scheme.HostNameResolver] Note: duplicate definition of library class [org.apache.http.conn.scheme.SocketFactory] Note: duplicate definition of library class [org.apache.http.conn.ConnectTimeoutException] Note: duplicate definition of library class [org.apache.http.params.HttpParams] Note: duplicate definition of library class [android.net.http.SslCertificate$DName] Note: duplicate definition of library class [android.net.http.SslError] Note: duplicate definition of library class [android.net.http.SslCertificate] …

3
Android Studio-部署发行版APK,而不是调试
Android Studio中的运行配置仅允许您部署默认的(调试)APK,但是我已经通过从Android Studio(作为外部工具)中运行gradle assembleDebug来构建了发行版APK,并希望部署它。但似乎您无法更改Android Studio安装的APK。可以选择部署自定义工件,但是我不确定这是什么,或者它是否有帮助,无论如何,似乎没有选择在Android Studio项目结构对话框中创建新工件。 。 有谁知道我如何指定Android Studio部署的APK的路径?我知道我可以从命令行使用adb进行安装,但是如果我单击一个按钮,它将加快处理速度。谢谢。

17
手动安装Gradle并在Android Studio中使用它
我正在使用Android Studio。我如何可以手动安装和使用Gradle中Android Studio。 我已经Gradle从http://www.gradle.org/downloads版本gradle-2.1-all.zip下载了。 当我打开压缩文件时,我可以看到bin,docs等,但是我不知道将文件复制到哪里。甚至在复制了如何在Android中使用它之后。





9
生成签名的APK Android Studio
我是android开发的新手,刚刚完成了我的第一个应用程序。我想在android studio中生成一个签名的apk。我阅读了开发人员文档,但无法理解这些步骤。当我单击时Build>Generate Signed APK...,它将显示一个对话框,询问以下内容: Keystore path //with two options create new and choose existing Keystore password Key alias key password 谷歌搜索后,我什么都不知道。当我选择create new它时,它要求我选择一个路径并找到一个.jks我没有的文件!任何人都可以解释并列出步骤以生成签名的apk。

3
Android DeadSystemException
目前,我们DeadSystemException在HockeyApp崩溃报告中遇到了。它发生在Android 7.0和Android 7.1上。在我们的应用程序的先前版本中我们没有遇到此异常(当前它们都被用户使用),因此我想这个异常是由代码更改引起的。但是堆栈跟踪对此不是很有帮助。任何的想法?感谢您的任何建议。 HockeyApp的堆栈跟踪: java.lang.RuntimeException: android.os.DeadSystemException at android.app.ActivityThread$StopInfo.run(ActivityThread.java:3781) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: android.os.DeadSystemException ... 8 more
83 android 

30
安装失败,因为:'null'-Android Studio 3.5
自从遇到APK安装问题以来,我已将Android Studio更新至3.5。这是它显示的唯一日志: Installation did not succeed. The application could not be installed: INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION Installation failed due to: 'null' Retry 尝试在真实设备上安装APK时会发生这种情况。如果我从设备上卸载该应用程序,然后重新运行该版本,则它只会安装一次,然后在下一次安装时会不断抛出此错误。它可以在仿真器上正常运行,但我不能为所有功能使用仿真器。 我试过的 删除的Android Studio配置文件。 从项目中删除了Gradle文件。 无效和重置缓存。 清理/重建项目。 寻找类似的问题Stackoverflow(没有匹配我的问题) 全新安装(删除了包括SDK在内的所有文件)Android Studio 3.5 更新资料 我在计算机上安装了Linux Mint,并在那里测试了AS 3.5,由于某种原因,即使对于Android 7及更低版本的设备,一切都可以正常工作。 以前的操作系统:Windows 10 1903 当前操作系统:Linux Mint 19.2 我认为此问题可能源自Windows计算机。

9
如何在Android平台上打开“前置摄像头”?
更一般而言,如果设备具有多个嵌入式相机,是否有办法特别初始化其中一个? 我在Android参考文档中找不到它: https://developer.android.com/reference/android/hardware/Camera.html https://developer.android.com/reference/android/hardware/camera2/package-summary.html https://developer.android.com/reference/android/hardware/camera2/CameraManager.html 三星SHW-M100S有两个摄像头。如果没有提到要使用两台相机,那三星会如何...?

7
在2.3上完成SoftInput操作标签的多行EditText
有没有办法EditText在Android 2.3上使用多行显示并使用IME操作标签“完成”? 在Android 2.2中,这不是问题,输入按钮显示IME操作标签“完成”(android:imeActionLabel="actionDone"),并在单击时关闭“软输入”。 EditText为多行配置时,Android 2.3删除了显示“软输入”键盘的“完成”操作的功能。 我设法通过使用来更改“软输入”输入按钮的行为KeyListener,但是输入按钮仍然看起来像是回车键。 这是声明 EditText <EditText android:id="@+id/Comment" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:layout_marginBottom="0dp" android:lines="3" android:maxLines="3" android:minLines="3" android:maxLength="60" android:scrollHorizontally="false" android:hint="hint" android:gravity="top|left" android:textColor="#888" android:textSize="14dp" /> <!-- android:inputType="text" will kill the multiline on 2.3! --> <!-- android:imeOptions="actionDone" switches to a "t9" like soft input --> inputType在加载设置活动中的内容视图后检查值时,它显示为: inputType = 0x20001 这是: 类= …

14
如何从片段内部隐藏软键盘?
我有一个FragmentActivity使用AViewPager服务几个片段。每个都是ListFragment具有以下布局的: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="8dp"> <ListView android:id="@id/android:list" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <EditText android:id="@+id/entertext" android:layout_width="fill_parent" android:layout_height="wrap_content" /> </LinearLayout> </LinearLayout> 开始活动时,将显示软键盘。为了解决这个问题,我在片段中做了以下操作: @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { //Save the container view so we can access the window token viewContainer = container; …

4
无法添加窗口android.view.ViewRoot$W@44da9bc0-拒绝此窗口类型的权限
例如,我更喜欢这篇文章,但是在将viewgroup添加到windowmanager对象中时出现了错误,我对服务使用的类与发布到问题中的类相同,没有任何改变,我会误以为我没有得到它 WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE); wm.addView(mView, params); // here 当我向WindowManger添加视图时 这是我的清单文件 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.searce.testoverlay" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="7" /> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name="TestOverlayActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <service android:enabled="true" android:name=".HUD"></service> </application> </manifest> 错误 09-27 18:49:23.561: ERROR/AndroidRuntime(653): Uncaught handler: thread …
82 android  overlay 

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.