- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我无法在调试和 Release模式下使用 minifyEnabled true 运行 apk。我已经引用了下面的链接,但没有一个对我有用。
1. Android- Error:Execution failed for task ':app:transformClassesWithDexForRelease'
下面是应用build.gradle文件
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId 'XX.XX.XXX'
minSdkVersion 21
targetSdkVersion 23
versionCode 9
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
sourceSets.main {
jni.srcDirs = [] //disable automatic ndk-build call
jniLibs.srcDir 'src/main/libs' //integrate your libs from libs instead of jniLibs
}
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
lintOptions {
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
// compile files('libs/maflogonimo-1.210.3.jar')
compile project(':android-logging-log4j-1.0.3')
compile project(':log4j-1.2.17')
compile files('libs/gson-2.6.2.jar')
//compile files('libs/javarosa-libraries-2015-09-02.jar')
compile 'com.android.support:design:23.4.0'
//compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
// compile 'com.google.android.gms:play-services:10.0.1'
// compile 'com.google.android.gms:play-services-fcm:9.6.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
// compile 'com.viewpagerindicator:library:2.4.1@aar'
//compile files('libs/hellocharts-library-1.5.8.jar')
compile 'com.esri.arcgis.android:arcgis-android:10.2.8-1'
//GIS
compile(name:'ClientHubSLL-3.16.1', ext:'aar')
compile(name:'ClientLog-3.16.1', ext:'aar')
compile(name:'Common-3.16.1', ext:'aar')
compile(name:'Connectivity-3.16.1', ext:'aar')
compile(name:'CoreServices-3.16.1', ext:'aar')
compile(name:'DataVaultLib-3.16.1', ext:'aar')
compile(name:'E2ETrace-3.16.1', ext:'aar')
compile(name:'HttpConvAuthFlows-3.16.1', ext:'aar')
compile(name:'HttpConversation-3.16.1', ext:'aar')
compile(name:'MAFLogger-3.16.1', ext:'aar')
compile(name:'MAFLogonCore-3.16.1', ext:'aar')
compile(name:'ODataAPI-3.16.1', ext:'aar')
compile(name:'ODataOnline-3.16.1', ext:'aar')
compile(name:'Request-3.16.1', ext:'aar')
compile(name:'SupportabilityFacade-3.16.1', ext:'aar')
compile(name:'MAFCalendar-3.16.1', ext:'aar')
compile(name:'MAFLocaleAwareControls-3.16.1', ext:'aar')
compile(name:'MAFLogViewer-3.16.1', ext:'aar')
compile(name:'MAFSettingScreen-3.16.1', ext:'aar')
compile(name:'MAFTreeView-3.16.1', ext:'aar')
compile(name:'MAFUIComponents-3.16.1', ext:'aar')
compile(name:'XscriptParser-3.16.1', ext:'aar')
compile(name:'MAFLogonUI-3.16.1', ext:'aar')
compile(name:'MobilePlace-3.16.1', ext:'aar')
}
apply plugin: 'com.google.gms.google-services'
下面是proguard-rules.pro文件
-renamesourcefileattribute SourceFile
-keepattributes SourceFile, LineNumberTable
-keepattributes Exceptions, Signature
-keepattributes EnclosingMethod
-keepattributes InnerClasses
-keep class org.javarosa.** { *; }
-keep class com.sap.** { *; }
-keep class jcifs.** { *; }
-dontwarn com.google.**
-dontwarn org.apache.**
-dontwarn com.sap.**
-dontwarn au.com.bytecode.**
-dontwarn org.joda.**
-dontwarn android.content.**
-dontwarn android.graphics.**
-dontwarn android.util.**
-dontwarn android.view.**
-dontwarn javax.servlet.**
-dontwarn jcifs.http.**
-dontwarn org.codehaus.**
从命令行运行时出现以下异常
cause: java.lang.RuntimeException: Exception parsing classes
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
at com.android.dx.command.dexer.Main.processClass(Main.java:752)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)
at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
at com.android.dx.command.dexer.Main.run(Main.java:275)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Caused by: com.android.dx.cf.iface.ParseException: bad descriptor: charOffset
at com.android.dx.cf.direct.AttributeListParser.parse(AttributeListParser.java:156)
at com.android.dx.cf.direct.AttributeListParser.parseIfNecessary(AttributeListParser.java:115)
at com.android.dx.cf.direct.AttributeListParser.getEndOffset(AttributeListParser.java:96)
at com.android.dx.cf.direct.MemberListParser.parse(MemberListParser.java:213)
at com.android.dx.cf.direct.MemberListParser.parseIfNecessary(MemberListParser.java:108)
at com.android.dx.cf.direct.MethodListParser.getList(MethodListParser.java:54)
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:542)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
at com.android.dx.command.dexer.Main.processClass(Main.java:749)
... 12 more
Caused by: java.lang.IllegalArgumentException: bad descriptor: charOffset
at com.android.dx.rop.type.Type.intern(Type.java:330)
at com.android.dx.cf.direct.AnnotationParser.parseAnnotation(AnnotationParser.java:248)
at com.android.dx.cf.direct.AnnotationParser.parseAnnotations(AnnotationParser.java:223)
at com.android.dx.cf.direct.AnnotationParser.parseAnnotationsList(AnnotationParser.java:188)
at com.android.dx.cf.direct.AnnotationParser.parseParameterAttribute(AnnotationParser.java:127)
at com.android.dx.cf.direct.StdAttributeFactory.runtimeVisibleParameterAnnotations(StdAttributeFactory.java:666)
at com.android.dx.cf.direct.StdAttributeFactory.parse0(StdAttributeFactory.java:162)
at com.android.dx.cf.direct.AttributeFactory.parse(AttributeFactory.java:96)
at com.android.dx.cf.direct.AttributeListParser.parse(AttributeListParser.java:141)
... 25 more
16:35:57.798 [ERROR] [org.gradle.api.Project] 1 error; aborting
16:35:57.800 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':app:transformClassesWithDexForRelease'
16:35:57.801 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :app:transformClassesWithDexForRelease FAILED
16:35:57.804 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :app:transformClassesWithDexForRelease (Thread[Daemon worker,5,main]) completed. Took 1 mins 1.425 secs.
16:35:57.807 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker,5,main]] finished, busy: 14 mins 11.51 secs, idle: 0.078 secs
16:35:57.870 [ERROR] [org.gradle.BuildExceptionReporter]
16:35:57.871 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
16:35:57.872 [ERROR] [org.gradle.BuildExceptionReporter]
16:35:57.872 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
16:35:57.872 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':app:transformClassesWithDexForRelease'.
16:35:57.873 [ERROR] [org.gradle.BuildExceptionReporter] > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_161\bin\java.exe'' finished with non-zero exit value 1
16:35:57.874 [ERROR] [org.gradle.BuildExceptionReporter]
16:35:57.875 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
16:35:57.877 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
16:35:57.878 [LIFECYCLE] [org.gradle.BuildResultLogger]
16:35:57.878 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
16:35:57.880 [LIFECYCLE] [org.gradle.BuildResultLogger]
16:35:57.880 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 14 mins 46.244 secs
16:35:57.930 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (D:\myJobCard_SourceCode\.gradle\2.10\taskArtifacts\fileHashes.bin)
16:35:57.931 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileSnapshots.bin (D:\myJobCard_SourceCode\.gradle\2.10\taskArtifacts\fileSnapshots.bin)
16:35:57.932 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache taskArtifacts.bin (D:\myJobCard_SourceCode\.gradle\2.10\taskArtifacts\taskArtifacts.bin)
16:35:57.933 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache outputFileStates.bin (D:\myJobCard_SourceCode\.gradle\2.10\taskArtifacts\outputFileStates.bin)
16:35:57.933 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on task history cache (D:\myJobCard_SourceCode\.gradle\2.10\taskArtifacts).
16:35:57.935 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache jarSnapshots.bin (C:\Users\MY HOME\.gradle\caches\2.10\jarSnapshots\jarSnapshots.bin)
16:35:57.935 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on jar snapshots cache (C:\Users\MY HOME\.gradle\caches\2.10\jarSnapshots).
16:35:57.937 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache classAnalysis.bin (C:\Users\MY HOME\.gradle\caches\2.10\classAnalysis\classAnalysis.bin)
16:35:57.937 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on class analysis cache (C:\Users\MY HOME\.gradle\caches\2.10\classAnalysis).
16:35:57.939 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cp_settings class cache for settings file 'D:\myJobCard_SourceCode\settings.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\settings_erwoxweslgmu8miqym6kcb1dt\cp_settings).
16:35:57.939 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on settings class cache for settings file 'D:\myJobCard_SourceCode\settings.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\settings_erwoxweslgmu8miqym6kcb1dt\settings).
16:35:57.940 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cp_proj class cache for build file 'D:\myJobCard_SourceCode\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_7pkieelf3zpr7uf7k01l63rmx\cp_proj).
16:35:57.940 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj class cache for build file 'D:\myJobCard_SourceCode\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_7pkieelf3zpr7uf7k01l63rmx\proj).
16:35:57.940 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cp_proj class cache for build file 'D:\myJobCard_SourceCode\android-logging-log4j-1.0.3\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_7utva779gtlkclvebpnh750jk\cp_proj).
16:35:57.941 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj class cache for build file 'D:\myJobCard_SourceCode\android-logging-log4j-1.0.3\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_7utva779gtlkclvebpnh750jk\proj).
16:35:57.941 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cp_proj class cache for build file 'D:\myJobCard_SourceCode\app\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_56xn5xy2yld7cwkurxonzuovl\cp_proj).
16:35:57.942 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj class cache for build file 'D:\myJobCard_SourceCode\app\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_56xn5xy2yld7cwkurxonzuovl\proj).
16:35:57.942 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cp_proj class cache for build file 'D:\myJobCard_SourceCode\log4j-1.2.17\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_8bsoptu904i00rpm86ii2r5ih\cp_proj).
16:35:57.942 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on proj class cache for build file 'D:\myJobCard_SourceCode\log4j-1.2.17\build.gradle' (C:\Users\MY HOME\.gradle\caches\2.10\scripts\build_8bsoptu904i00rpm86ii2r5ih\proj).
16:35:57.944 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
16:35:57.945 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 8 (avg: 0.006 secs, total: 0.049 secs)
16:35:57.946 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.003 secs
16:35:57.946 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedRepositoryFactory] In-memory dependency metadata cache closed. Repos cached: 41, cache instances: 5, modules served from cache: 702, artifacts: 49
16:35:57.946 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-artifacts.bin (C:\Users\MY HOME\.gradle\caches\modules-2\metadata-2.16\module-artifacts.bin)
16:35:57.947 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache module-metadata.bin (C:\Users\MY HOME\.gradle\caches\modules-2\metadata-2.16\module-metadata.bin)
16:35:57.947 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache artifact-at-repository.bin (C:\Users\MY HOME\.gradle\caches\modules-2\metadata-2.16\artifact-at-repository.bin)
16:35:57.947 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on artifact cache (C:\Users\MY HOME\.gradle\caches\modules-2).
16:35:57.949 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache Plugin Resolution Cache (C:\Users\MY HOME\.gradle\caches\2.10\plugin-resolution) was closed 0 times.
16:35:57.950 [DEBUG] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopping 0 compiler daemon(s).
16:35:57.950 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonManager] Stopped 0 compiler daemon(s).
16:35:57.952 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
16:36:45.960 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@66269a8
16:36:45.966 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 17: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
16:36:45.971 [INFO] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:transformClassesWithDexForRelease'.] from daemon DaemonInfo{pid=22532, address=[dcdd43f4-9cff-4985-9851-6f1b9dfca80e port:65391, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], idle=false, context=DefaultDaemonContext[uid=b61dca0a-e70c-4dec-98ed-b69fe929e57e,javaHome=C:\Program Files\Java\jdk1.8.0_161,daemonRegistryDir=C:\Users\MY HOME\.gradle\daemon,pid=22532,idleTimeout=120000,daemonOpts=-Xmx4096m,-Dfile.encoding=windows-1252,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
16:36:45.977 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
我正在使用 Android Studio 1.5.1。这个 Android Studio 版本是否对混淆很重要(minifyEnabled true)?是否有用于加密 APK 的任何在线或离线工具?请建议我。我在这上面浪费了很多时间。请帮我解决这个问题。提前致谢。
最佳答案
Well... As you haven't mentioned yet, to the ant, to pro-guard your app, That's why it is not able to obfuscate it. Use explicitly
useProguard true
需要一个应用程序 gradle 构建文件的简单示例...?在下面找到它,因为它属于我的项目:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.xxxxxxxxxxcccccccvvvvvv.apps.firebase"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
shrinkResources true
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Now what it means in wording : It will only
obfuscate
your code in release of your project; which means you have to build your release apk.
我们开始...
Hmmmm... Hope it helps
在 pro-guard 规则文件中...不要尝试像代码一样对其进行编程,只保留一些不太重要的类:-保持公共(public)类开源
就是这样。
最重要的是,作为初学者,您应该并且必须使用由 android studio 或任何您的 IDE 设置的默认 pro-guard 文件;在创建项目时。喜欢:
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
创建一个新的示例项目是一个好习惯,学习如何实现任何概念,一旦我们动手并清除了概念......,打开主项目并在......内实现它,作为。 .. 到目前为止,我们已经掌握了这个概念。
与其他任何 IDE 相比,始终建议使用 Android Studio,因为它由 google 正式发布,就像 android 一样。它必须是最新的和更新的 IDE,至少启用了 api 26。谷歌上周强制要求在谷歌播放应用程序上上传应用程序必须以 api 级别 26 为目标。
它还有助于您的项目无错误地构建它,因为所有最新的依赖项都与补丁一起存在。
关于android - 混淆(minifyEnabled true)在调试和发布中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51720018/
我最近在/ drawable中添加了一些.gifs,以便可以将它们与按钮一起使用。这个工作正常(没有错误)。现在,当我重建/运行我的应用程序时,出现以下错误: Error: Gradle: Execu
Android 中有返回内部存储数据路径的方法吗? 我有 2 部 Android 智能手机(Samsung s2 和 s7 edge),我在其中安装了一个应用程序。我想使用位于这条路径中的 sqlit
这个问题在这里已经有了答案: What's the difference between "?android:" and "@android:" in an android layout xml f
我只想知道 android 开发手机、android 普通手机和 android root 手机之间的实际区别。 我们不能从实体店或除 android marketplace 以外的其他地方购买开发手
自Gradle更新以来,我正在努力使这个项目达到标准。这是一个团队项目,它使用的是android-apt插件。我已经进行了必要的语法更改(编译->实现和apt->注释处理器),但是编译器仍在告诉我存在
我是android和kotlin的新手,所以请原谅要解决的一个非常简单的问题! 我已经使用导航体系结构组件创建了一个基本应用程序,使用了底部的导航栏和三个导航选项。每个导航选项都指向一个专用片段,该片
我目前正在使用 Facebook official SDK for Android . 我现在正在使用高级示例应用程序,但我不知道如何让它获取应用程序墙/流/状态而不是登录的用户。 这可能吗?在那种情
我在下载文件时遇到问题, 我可以在模拟器中下载文件,但无法在手机上使用。我已经定义了上网和写入 SD 卡的权限。 我在服务器上有一个 doc 文件,如果用户单击下载。它下载文件。这在模拟器中工作正常但
这个问题在这里已经有了答案: What is the difference between gravity and layout_gravity in Android? (22 个答案) 关闭 9
任何人都可以告诉我什么是 android 缓存和应用程序缓存,因为当我们谈论缓存清理应用程序时,它的作用是,缓存清理概念是清理应用程序缓存还是像内存管理一样主存储、RAM、缓存是不同的并且据我所知,缓
假设应用程序 Foo 和 Eggs 在同一台 Android 设备上。任一应用程序都可以获取设备上所有应用程序的列表。一个应用程序是否有可能知道另一个应用程序是否已经运行以及运行了多长时间? 最佳答案
我有点困惑,我只看到了从 android 到 pc 或者从 android 到 pc 的例子。我需要制作一个从两部手机 (android) 连接的 android 应用程序进行视频聊天。我在想,我知道
用于使用 Android 以编程方式锁定屏幕。我从 Stackoverflow 之前关于此的问题中得到了一些好主意,并且我做得很好,但是当我运行该代码时,没有异常和错误。而且,屏幕没有锁定。请在这段代
文档说: android:layout_alignParentStart If true, makes the start edge of this view match the start edge
我不知道这两个属性和高度之间的区别。 以一个TextView为例,如果我将它的layout_width设置为wrap_content,并将它的width设置为50 dip,会发生什么情况? 最佳答案
这两个属性有什么关系?如果我有 android:noHistory="true",那么有 android:finishOnTaskLaunch="true" 有什么意义吗? 最佳答案 假设您的应用中有
我是新手,正在尝试理解以下 XML 代码: 查看 developer.android.com 上的文档,它说“starStyle”是 R.attr 中的常量, public static final
在下面的代码中,为什么当我设置时单选按钮的外观会发生变化 android:layout_width="fill_parent" 和 android:width="fill_parent" 我说的是
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 9
假设我有一个函数 fun myFunction(name:String, email:String){},当我调用这个函数时 myFunction('Ali', 'ali@test.com ') 如何
我是一名优秀的程序员,十分优秀!