android studio 可以build但run会报错

android studio 可以build但run会报错 并且已经参考网上把gradle对应版本对应了
(想运行个hello world都这么难。。。。)
图片说明

图片说明

3个回答

原因是代理设置错误。

qq_40942328
qq_40942328 build failed 里面是 Connection timed out: connect 另外event log里面有报错是:18:43 Emulator: emulator: WARNING: Could not connect to proxy at 192.168.1.108:80: Unknown error ! 18:46 Gradle build failed in 2 m 26 s 117 ms 18:48 Emulator: emulator: WARNING: UpdateCheck: Failure: Error
2 个月之前 回复

网络不需要代理就把代理去掉,需要代理手动改下Ip
图片说明

1、换个网络好一点的wifi;或者2、直接翻墙;

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Android studio build时候报错
FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'MyApplication'. > Could not resolve all dependencies for configuration ':classpath'. > Could not resolve com.android.tools.build:gradle:1.5.0. Required by: :MyApplication:unspecified > Could not resolve com.android.tools.build:gradle:1.5.0. > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom'. > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.5.0/gradle-1.5.0.pom'. > Connection to https://jcenter.bintray.com refused * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 45.925 secs Process finished with exit code 1 本地是有gradle的,但是好像build的时候还需要去下载似的 这个是运行出来的gradlew compileDebug --stacktrace 出来的Log信息,求指教 D:\work\Androidstudio\project\MyApplication>gradlew compileDebug --stacktrace Downloading https://services.gradle.org/distributions/gradle-2.8-all.zip Exception in thread "main" java.net.UnknownHostException: services.gradle.org at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:184) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:649) at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:173) at sun.net.NetworkClient.doConnect(NetworkClient.java:180) at sun.net.www.http.HttpClient.openServer(HttpClient.java:432) at sun.net.www.http.HttpClient.openServer(HttpClient.java:527) at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:275) at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1103) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:997) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1511) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at org.gradle.wrapper.Download.downloadInternal(Download.java:58) at org.gradle.wrapper.Download.download(Download.java:44) at org.gradle.wrapper.Install$1.call(Install.java:61) at org.gradle.wrapper.Install$1.call(Install.java:48) at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Android studio编程这个报错怎么解决
Error:Could not run build action using Gradle installation 'D:\Program Files\Android\Android Studio\gradle\gradle-2.4'. 这个报错怎么解决?
android studio里配置C++报错?
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101) at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249) at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663) at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.lang.Thread.run(Thread.java:745) Caused by: java.io.UncheckedIOException: java.nio.file.AccessDeniedException: C:\WINDOWS\Temp at com.android.builder.merge.LazyIncrementalFileMergerInputs.load(LazyIncrementalFileMergerInputs.java:88) at com.android.builder.merge.LazyIncrementalFileMergerInputs.lambda$fromNew$0(LazyIncrementalFileMergerInputs.java:59) at com.android.tools.build.apkzlib.utils.CachedSupplier.get(CachedSupplier.java:72) at com.android.builder.merge.LazyIncrementalFileMergerInput.lambda$new$2(LazyIncrementalFileMergerInput.java:138) at com.android.tools.build.apkzlib.utils.CachedSupplier.get(CachedSupplier.java:72) at com.android.builder.merge.LazyIncrementalFileMergerInput.open(LazyIncrementalFileMergerInput.java:225) at com.android.builder.merge.DelegateIncrementalFileMergerInput.open(DelegateIncrementalFileMergerInput.java:49) at com.google.common.collect.ImmutableList.forEach(ImmutableList.java:406) at com.android.builder.merge.IncrementalFileMerger.merge(IncrementalFileMerger.java:73) at com.android.build.gradle.internal.transforms.MergeJavaResourcesTransform.transform(MergeJavaResourcesTransform.java:411) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:239) at com.android.build.gradle.internal.pipeline.TransformTask$2.call(TransformTask.java:235) at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:102) at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336) at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328) at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95) ... 33 more Caused by: java.nio.file.AccessDeniedException: C:\WINDOWS\Temp at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97) at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102) at sun.nio.fs.WindowsDirectoryStream.<init>(WindowsDirectoryStream.java:86) at sun.nio.fs.WindowsFileSystemProvider.newDirectoryStream(WindowsFileSystemProvider.java:518) at java.nio.file.Files.newDirectoryStream(Files.java:457) at com.google.common.io.MoreFiles.deleteRecursively(MoreFiles.java:516) at com.android.tools.build.apkzlib.bytestorage.TemporaryFile.deleteFile(TemporaryFile.java:57) at com.android.tools.build.apkzlib.bytestorage.TemporaryFile.close(TemporaryFile.java:48) at com.android.tools.build.apkzlib.bytestorage.TemporaryDirectory$1.close(TemporaryDirectory.java:50) at com.android.tools.build.apkzlib.bytestorage.TemporaryDirectoryStorage.close(TemporaryDirectoryStorage.java:101) at com.android.tools.build.apkzlib.bytestorage.OverflowToDiskByteStorage.close(OverflowToDiskByteStorage.java:167) at com.android.tools.build.apkzlib.bytestorage.ChunkBasedByteStorage.close(ChunkBasedByteStorage.java:142) at com.android.tools.build.apkzlib.zip.ZFile.close(ZFile.java:1210) at com.android.builder.files.RelativeFiles.fromZip(RelativeFiles.java:125) at com.android.builder.merge.LazyIncrementalFileMergerInputs.load(LazyIncrementalFileMergerInputs.java:86) ... 61 more
android studio 混淆后,打包报错!!!
`` > Exception while processing task java.io.IOException: The same input jar [E:\Work\gv\app\libs\open_sdk_r5509.jar] is specified twice. > at proguard.ConfigurationChecker.checkConflicts(ConfigurationChecker.java:216) > at proguard.ConfigurationChecker.check(ConfigurationChecker.java:83) > at proguard.ProGuard.execute(ProGuard.java:73) > at proguard.gradle.ProGuardTask.proguard(ProGuardTask.java:1074) > at com.android.build.gradle.tasks.AndroidProGuardTask.doMinification(AndroidProGuardTask.java:139) at com.android.build.gradle.tasks.AndroidProGuardTask$1.run(AndroidProGuardTask.java:115) > at com.android.builder.tasks.Job.runTask(Job.java:48) > at com.android.build.gradle.tasks.SimpleWorkQueue$EmptyThreadContext.runTask(SimpleWorkQueue.java:41) > at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:227) > at java.lang.Thread.run(Thread.java:745) > :app:dexAnzhiRelease UP-TO-DATE > :app:validateReleaseSigning > :app:packageAnzhiRelease FAILED > FAILURE: Build failed with an exception. > * What went wrong: > Execution failed for task ':app:packageAnzhiRelease'. > Unable to compute hash of E:\Work\gv\app\build\intermediates\classes-proguard\anzhi\release\classes.jar * Try: > Run with --stacktrace option to get the stack trace. Run with --info or --debug > option to get more log output. > BUILD FAILED > Total time: 18.962 secs ` > ``` 请大神指导,小弟在线求。刚才在网上学习了混淆技巧,把混淆模板复制过去,然后打包报错。
android studio连接mysql数据库报错,请问这是那里的问题?
我用android studio 连接mysql数据库,用的是从maven上下载的JDBC包。但是点击运行后它提示: AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): com.mysql.cj.protocol.Message com.mysql.cj.interceptors.QueryInterceptor.postProcess(com.mysql.cj.protocol.Message, com.mysql.cj.protocol.Message)","sources":[{}],"tool":"D8"} FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:mergeExtDexDebug'. > Could not resolve all files for configuration ':app:debugRuntimeClasspath'. > Failed to transform file 'mysql-connector-java-8.0.11.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=15, org.gradle.usage=java-runtime-jars} > Execution failed for DexingTransform: D:\Anzhuo-SDK\android project\app\libs\mysql-connector-java-8.0.11.jar. > Error while dexing. > Failed to transform file 'mysql-connector-java-8.0.11.jar' to match attributes {artifactType=android-dex, dexing-is-debuggable=true, dexing-min-sdk=15, org.gradle.usage=java-runtime-jars} > Execution failed for DexingTransform: D:\Anzhuo-SDK\android project\app\libs\mysql-connector-java-8.0.11.jar. > Error while dexing. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0. Use '--warning-mode all' to show the individual deprecation warnings. See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings BUILD FAILED in 19s 我想问一下,这是为什么?是因为JAR的版本问题吗?
刚安装好android studio 后新建第一个项目报错 Gradle sync failed
android studio 新建项目 Gradle sync failed: The first result from the daemon was empty. Most likely the process died immediately after connection. ![图片说明](https://img-ask.csdn.net/upload/201701/24/1485259415_875463.png) 关闭了杀毒软件,但还是报错; File->Invalidate Caches/Restart仍然出现这样的错误 ![图片说明](https://img-ask.csdn.net/upload/201701/24/1485259599_139647.png) 电脑没有连接任何其他设备 关于gradle的设置和文件是这样的:![图片说明](https://img-ask.csdn.net/upload/201701/24/1485259902_92537.png) ![图片说明](https://img-ask.csdn.net/upload/201701/24/1485259913_196525.png) ![图片说明](https://img-ask.csdn.net/upload/201701/24/1485261039_326185.png) 打开后看到: Caused by: org.gradle.launcher.daemon.client.NoUsableDaemonFoundException: Unable to find a usable idle daemon. I have connected to 100 different daemons but I could not use any of them to run the build. BuildActionParameters were DefaultBuildActionParameters {, currentDir=F:\Android_studio_projects\MyApplication, systemProperties size=91, envVariables size=43, logLevel=LIFECYCLE, daemonUsage=IMPLICITLY_DISABLED, continuous=false, interactive=false, injectedPluginClasspath=[]}.
android studio 编译问题
最近用android studio2.3 run一个项目发现报错,android studio2.3,gradle 2.3.1, gradle wrapper 是3.3-all, 报错如下,怎么破? Error:Execution failed for task ':app:packageXxxxDebug'. > java.io.IOException: Failed to read zip file 'D:\xxx\app\build\intermediates\transforms\mergeJavaRes\xxx\debug\jars\2\1f\main.jar'.
Android studio 混淆打包报错了
先运行gradlew clean,没有问题。 再运行gradlew assembleRelease 就报了下面的错: Warning: D:\deve\Adrich\AndroidManifest.xml:23:5 Warning: application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present Warning: D:\deve\Adrich\AndroidManifest.xml:23:5 Warning: application@android:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present D:\deve\Adrich\AndroidManifest.xml:23:5 Warning: application@android:icon was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present D:\deve\Adrich\AndroidManifest.xml:23:5 Warning: application@android:theme was tagged at AndroidManifest.xml:23 to replace other declarations but no other declaration present :Adrich:processReleaseResources D:\deve\Adrich\build\intermediates\res\release\layout\recharge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white'). D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white'). D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_activity.xml:74: error: Error: No resource found that matches the given name (at 'background' with value '@color/white'). :Adrich:processReleaseResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':Adrich:processReleaseResources'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: D:\android\adt-bundle-windows-x86_64-20140702\sdk\build-tools\android-4.4W\aapt.exe package -f --no-crunch -I D:\android\adt-bundle-windows-x86_64-20140702\sdk\platforms\android-19\android.jar -M D:\deve\Adrich\build\intermediates\manifests\full\release\AndroidManifest.xml -S D:\deve\Adrich\build\intermediates\res\release -A D:\deve\Adrich\build\intermediates\assets\release -m -J D:\deve\Adrich\build\generated\source\r\release -F D:\deve\Adrich\build\intermediates\res\resources-release.ap_ -G D:\deve\Adrich\build\intermediates\proguard-rules\release\aapt_rules.txt --custom-package com.adrich.adrich -0 apk --output-text-symbols D:\deve\Adrich\build\intermediates\symbols\release Error Code: 1 Output: D:\deve\Adrich\build\intermediates\res\release\layout\recharge1_activity.xml:100: error: Error: No resource found that matches the given name (at 'background' with value '@color/white'). D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_activity.xml:52: error: Error: No resource found that matches the given name (at 'background' with value '@color/white'). D:\deve\Adrich\build\intermediates\res\release\layout\recharge2_activity.xml:74: error: Error: No resource found that matches the given name (at 'background' with value '@color/white'). * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 2 mins 3.648 secs
android studio 导入报错
开始可以运行 然后我拷贝到另外一台电脑上就无法运行 先是报错 Installation failed with message Invalid File: K:\project\app\build\intermediates\split-apk\with_ImageProcessor\debug\slices\slice_0.apk. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing. WARNING: Uninstalling will remove the application data! Do you want to uninstall the existing application? 然后我按照stackoverflow上的方法 Click Build tab ---> Clean Project Click Build tab ---> Build APK Run. 走了一遍 但是程序打不开 点击debug 然后 debug界面显示 $ adb install-multiple -r /Users/user/Desktop/x1/Xd/app/build/outputs/apk/app-debug.apk Split APKs installed $ adb shell am start -n "com.example.user.xd/com.example.user.xd.FirstActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D Connecting to com.example.user.xd Connected to the target VM, address: 'localhost:8600', transport: 'socket' Disconnected from the target VM, address: 'localhost:8600', transport: 'socket' Android Monitor 提示 09-21 21:59:40.061 22694-22694/? I/art: Late-enabling -Xcheck:jni 09-21 21:59:40.114 22694-22694/com.example.user.xd W/ActivityThread: Application com.example.user.xd is waiting for the debugger on port 8100... 09-21 21:59:40.114 22694-22694/com.example.user.xd I/System.out: Sending WAIT chunk 09-21 21:59:40.315 22694-22700/com.example.user.xd I/art: Debugger is active 09-21 21:59:40.515 22694-22694/com.example.user.xd I/System.out: Debugger has connected 09-21 21:59:40.515 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:40.715 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:40.915 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.115 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.316 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.516 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.716 22694-22694/com.example.user.xd I/System.out: waiting for debugger to settle... 09-21 21:59:41.917 22694-22694/com.example.user.xd I/System.out: debugger has settled (1396) 09-21 21:59:42.009 22694-22694/com.example.user.xd W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --non-interactive --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.example.user.xd-2@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status 09-21 21:59:42.020 22694-22694/com.example.user.xd W/art: Fallback to original dex file with interpret-mode for /data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk 09-21 21:59:42.021 22694-22694/com.example.user.xd W/System: ClassLoader referenced unknown path: /data/app/com.example.user.xd-2/lib/arm 09-21 21:59:42.025 22694-22694/com.example.user.xd I/InstantRun: starting instant run server: is main process 09-21 21:59:42.031 22694-22694/com.example.user.xd I/art: Rejecting re-init on previously-failed class java.lang.Class<com.example.user.xd.FirstActivity> 09-21 21:59:42.031 22694-22694/com.example.user.xd D/AndroidRuntime: Shutting down VM 09-21 21:59:42.035 22694-22694/com.example.user.xd E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.user.xd, PID: 22694 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.user.xd/com.example.user.xd.FirstActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.user.xd.FirstActivity" on path: DexPathList[[zip file "/data/app/com.example.user.xd-2/base.apk", zip file "/data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.user.xd-2/lib/arm, /vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2360) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509) at android.app.ActivityThread.access$1000(ActivityThread.java:153) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:5528) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.user.xd.FirstActivity" on path: DexPathList[[zip file "/data/app/com.example.user.xd-2/base.apk", zip file "/data/app/com.example.user.xd-2/split_lib_slice_0_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.user.xd-2/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.app.Instrumentation.newActivity(Instrumentation.java:1068) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2350) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2509)  at android.app.ActivityThread.access$1000(ActivityThread.java:153)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1373)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:5528)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)  Suppressed: java.lang.NoClassDefFoundError: com.example.user.xd.FirstActivity at dalvik.system.DexFile.defineClassNative(Native Method) at dalvik.system.DexFile.defineClass(DexFile.java:226) at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219) at dalvik.system.DexPathList.findClass(DexPathList.java:338) at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54) ... 13 more Suppressed: java.lang.ClassNotFoundException: com.example.user.xd.FirstActivity at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 12 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
react-native run-android报错
之前项目在VScode里运行时没有任何问题,但是隔天再次打开时候报错了,报错如下 ``` > Task :app:processDebugResources FAILED FAILURE: Build failed with an exception. * What went wrong: Failed to capture snapshot of output files for task ':app:processDebugResources' property 'sourceOutputDir' during up-to-date check. > Could not read path 'D:\ReactNativeProject\MyApp\android\app\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\com\facebook\imagepipeline\backends'. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org ``` 经过查询后知道如何解决,按照下面的方法就可解决 ``` //在项目的路径下输入 PS D:\ReactNativeProject\MyApp> cd android PS D:\ReactNativeProject\MyApp\android> ./gradlew clean //等待加载完后,回到上一层目录,执行react-native run-android。 PS D:\ReactNativeProject\MyApp\android> cd .. PS D:\ReactNativeProject\MyApp> react-native run-android ``` 问题解决
android studio 新建项目运行报错
Logcat 报错如下: **09-08 10:11:56.694 6639-6639/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.max.myapplication, PID: 6639 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.max.myapplication/com.max.myapplication.MainActivity}: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5045) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.IllegalStateException: This app has been built with an incorrect configuration. Please configure your build for VectorDrawableCompat. at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:692) at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:186) at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:77) at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:83) at android.support.v7.app.AppCompatDelegateImplV7.<init>(AppCompatDelegateImplV7.java:146) at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:28) at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:41) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:193) at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:173) at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:511) at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71) at com.max.myapplication.MainActivity.onCreate(MainActivity.java:10) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2163) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)  at android.app.ActivityThread.access$800(ActivityThread.java:135)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5045)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)  at dalvik.system.NativeStart.main(Native Method)  09-08 10:11:58.562 6639-6639/? I/Process: Sending signal. PID: 6639 SIG: 9****
Android Studio导入第三方库AndroidSwipeLayout 运行时报错
本人刚开始学习android,小白水平。在导入第三方库AndroidSwipeLayout的时候遇到错误:每次运行的时候都会报错Error: Program type already present: android.support.v4.os.ResultReceiver。 因为刚开始学习,对gradle还不是很了解,到网上查询之后说是可能我有两个包版本不同但同时导入才导致的,但是我实在找不到报错中的信息对应在构建文件中的什么部分,在网上找了几个办法也都没有管用,求大神指点! 导入时用的是import Module,然后在project structure里添加依赖。 本人对gradle正在努力学习,还不是很懂,,附上配置文件的部分: **项目的build.gradle** ``` buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.0-beta04' } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } ``` ## **app的build.gradle** ``` apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.zhang.hp.myapplication" minSdkVersion 15 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.appcompat:appcompat:1.0.0-alpha1' implementation 'androidx.constraintlayout:constraintlayout:1.1.2' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.0-alpha3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha3' implementation project(':library') } ``` ## 导入的library的build.gradle ``` apply plugin: 'com.android.library' android { compileSdkVersion Integer.parseInt(project.ANDROID_BUILD_SDK_VERSION) buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION defaultConfig { minSdkVersion 9 targetSdkVersion Integer.parseInt(project.ANDROID_BUILD_TARGET_SDK_VERSION) } } dependencies { compile 'com.android.support:recyclerview-v7:25.2.0' compile 'com.android.support:support-v4:25.2.0' } // build a jar with source files task sourcesJar(type: Jar) { from android.sourceSets.main.java.srcDirs classifier = 'sources' } artifacts { archives sourcesJar } ``` ## **gradle.properties** ``` # Project-wide Gradle settings. # IDE (e.g. Android Studio) users: # Gradle settings configured through the IDE *will override* # any settings specified in this file. # For more details on how to configure your build environment visit # http://www.gradle.org/docs/current/userguide/build_environment.html # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true ANDROID_BUILD_TARGET_SDK_VERSION=25 ANDROID_BUILD_TOOLS_VERSION=25.0.0 ANDROID_BUILD_SDK_VERSION=25 ANDROID_BUILD_MIN_SDK_VERSION=14 ``` 最好能说明一下导包的版本问题,希望大神们能指点一下,谢谢!
Android Studio如何配置环境变量
想请教一下,用Android Studio开发时,需要配置ANDROID_SDK_HOME环境变量吗?我设置的是sdk文件夹所在的路径: ``` C:\Users\acer\AppData\Local\Android\sdk ``` 有没有错呢?或者说是否需要配置呢?因为当我启动模拟器或者启动手机编译的时候,会有提示信息: ``` Waiting for device. C:\Users\acer\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_21_x86 -netspeed full -netdelay none ``` 以及gradle console的报错信息: ``` FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:preDexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\acer\AppData\Local\Android\sdk\build-tools\21.1.1\dx.bat --dex --output C:\Users\acer\AndroidStudioProjects\AndroidTutorial\app\build\intermediates\pre-dexed\debug\classes-88c274548bdbb2cca7c59c342ef8955f7e09092a.jar C:\Users\acer\AndroidStudioProjects\AndroidTutorial\app\build\intermediates\exploded-aar\com.android.support\support-v4\21.0.3\classes.jar Error Code: 255 Output: 'reg' 不是内部或外部命令,也不是可运行的程序 或批处理文件。 ```
android studio报错 看不太懂 新手
请各位帮我看看是什么问题 谢谢 * Try: Run gradle tasks to get a list of available tasks. Run with --info or --debug op tion to get more log output. * Exception is: org.gradle.execution.TaskSelectionException: Task 'compileDebug' not found in ro ot project 'fao167'. at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:100) at org.gradle.execution.TaskSelector.getSelection(TaskSelector.java:75) at org.gradle.execution.commandline.CommandLineTaskParser.parseTasks(Com mandLineTaskParser.java:42) at org.gradle.execution.TaskNameResolvingBuildConfigurationAction.config ure(TaskNameResolvingBuildConfigurationAction.java:44) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configur e(DefaultBuildConfigurationActionExecuter.java:48) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$0 00(DefaultBuildConfigurationActionExecuter.java:25) at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.procee d(DefaultBuildConfigurationActionExecuter.java:54) at org.gradle.execution.DefaultTasksBuildExecutionAction.configure(Defau ltTasksBuildExecutionAction.java:44) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configur e(DefaultBuildConfigurationActionExecuter.java:48) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.access$0 00(DefaultBuildConfigurationActionExecuter.java:25) at org.gradle.execution.DefaultBuildConfigurationActionExecuter$1.procee d(DefaultBuildConfigurationActionExecuter.java:54) at org.gradle.execution.ExcludedTaskFilteringBuildConfigurationAction.co nfigure(ExcludedTaskFilteringBuildConfigurationAction.java:47) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.configur e(DefaultBuildConfigurationActionExecuter.java:48) at org.gradle.execution.DefaultBuildConfigurationActionExecuter.select(D efaultBuildConfigurationActionExecuter.java:36) at org.gradle.initialization.DefaultGradleLauncher$3.run(DefaultGradleLa uncher.java:142) at org.gradle.internal.Factories$1.create(Factories.java:22) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul tBuildOperationExecutor.java:91) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul tBuildOperationExecutor.java:53) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(Default GradleLauncher.java:139) at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGra dleLauncher.java:32) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl eLauncher.java:98) at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradl eLauncher.java:92) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul tBuildOperationExecutor.java:91) at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(Defaul tBuildOperationExecutor.java:63) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradle Launcher.java:92) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLaun cher.java:83) at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildCon troller.run(InProcessBuildActionExecuter.java:99) at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(Exe cuteBuildActionRunner.java:28) at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildA ctionRunner.java:35) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce ssBuildActionExecuter.java:48) at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProce ssBuildActionExecuter.java:30) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin uousBuildActionExecuter.java:81) at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(Contin uousBuildActionExecuter.java:46) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe cute(DaemonUsageSuggestingBuildActionExecuter.java:51) at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.exe cute(DaemonUsageSuggestingBuildActionExecuter.java:28) at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43) at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.jav a:173) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction. execute(CommandLineActionFactory.java:239) at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction. execute(CommandLineActionFactory.java:212) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti meValidationAction.java:35) at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRunti meValidationAction.java:24) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep ortingAction.java:33) at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionRep ortingAction.java:22) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute( CommandLineActionFactory.java:205) at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute( CommandLineActionFactory.java:169) at org.gradle.launcher.Main.doAction(Main.java:33) at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45) at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBoots trap.java:55) at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.j ava:36) at org.gradle.launcher.GradleMain.main(GradleMain.java:23) BUILD FAILED Total time: 2.465 secs
android studio 多渠道打包报错
* What went wrong: Execution failed for task ':项目名:shrinkGuanwangReleaseMultiDexComponents'. > java.io.IOException: Can't read [D:\wanxiaoStudio\-2.5\build\intermediates\classes-proguard\guanwang\release\classes.jar] (Unexpected end of ZLIB input stream) * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED
react-native run-android报错ould not resolve all artifacts for configuration ':classpath'.
首次使用react native出现以下错误,但是 com.android.tools.build:gradle:3.3.0在我其他项目上是可以使用的
android studio 3.0 preview 创建添加C支持的项目时报错
错误如下: Build command failed. Error while executing process D:\Android\AndroidSDK\cmake\3.6.4111459\bin\cmake.exe with arguments {-HD:\Android\MyProject\TestC\app -BD:\Android\MyProject\TestC\app\.externalNativeBuild\cmake\release\armeabi -GAndroid Gradle - Ninja -DANDROID_ABI=armeabi -DANDROID_NDK=D:\Android\AndroidSDK\ndk-bundle -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\Android\MyProject\TestC\app\build\intermediates\cmake\release\obj\armeabi -DCMAKE_BUILD_TYPE=Release -DCMAKE_MAKE_PROGRAM=D:\Android\AndroidSDK\cmake\3.6.4111459\bin\ninja.exe -DCMAKE_TOOLCHAIN_FILE=D:\Android\AndroidSDK\ndk-bundle\build\cmake\android.toolchain.cmake -DANDROID_PLATFORM=android-15 -DCMAKE_CXX_FLAGS=-std=c++11 -frtti -fexceptions} -- Check for working C compiler: D:/Android/AndroidSDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- Check for working C compiler: D:/Android/AndroidSDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken CMake Error at D:/Android/AndroidSDK/cmake/3.6.4111459/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message): The C compiler "D:/Android/AndroidSDK/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/Android/MyProject/TestC/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/CMakeTmp Run Build Command:"D:\Android\AndroidSDK\cmake\3.6.4111459\bin\ninja.exe" "cmTC_80963" [1/2] Building C object CMakeFiles/cmTC_80963.dir/testCCompiler.c.o [2/2] Linking C executable cmTC_80963 ninja: fatal: CreateProcess: ����IJ�����Ҫ������ CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt -- Configuring incomplete, errors occurred! See also "D:/Android/MyProject/TestC/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/CMakeOutput.log". See also "D:/Android/MyProject/TestC/app/.externalNativeBuild/cmake/release/armeabi/CMakeFiles/CMakeError.log".那些乱码是“请求的操作需要提升”有谁知道这是这么回事么?
android studio 发布ap失败 求大神!
报错如下: Error:Failed to run command: D:\Program Files\Android\android-sdk\build-tools\20.0.0\aapt.exe s -i C:\Users\Administrator\AndroidstudioProjects\EBook21\app\src\main\res\drawable-hdpi\start.png -o C:\Users\Administrator\AndroidstudioProjects\EBook21\app\build\intermediates\res\release\drawable-hdpi-v4\start.png Error Code: 42 Output: libpng error: Not a PNG file :app:mergeReleaseResources FAILED Error:Execution failed for task ':app:mergeReleaseResources'. > Error: Failed to run command: D:\Program Files\Android\android-sdk\build-tools\20.0.0\aapt.exe s -i C:\Users\Administrator\AndroidstudioProjects\EBook21\app\src\main\res\drawable-hdpi\start.png -o C:\Users\Administrator\AndroidstudioProjects\EBook21\app\build\intermediates\res\release\drawable-hdpi-v4\start.png Error Code: 42 Output: libpng error: Not a PNG file 是什么意思?我删掉build文件夹,重新发布,依旧报这个错 哪位大神好心指导一下。。。
AndroidStudio项目突然不能build打包了,但是run是可以的
AndroidStudio 3.0 mac jdk1.7 java环境 突然项目不能打包了,build apk,build signed apk都报错app:transformClassesWithMultidexlistForDebug,但是直接run是可以的 ``` FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithMultidexlistForDebug'. > com.android.build.api.transform.TransformException: Error while generating the main dex list. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1m 0s ``` 然后尝试过得方法有 1,invalided caches /Restart 删除build重启电脑 2,彻底卸载AndroidStudio,重新安装 3,在App的build中添加 ``` buildTypes { debug { useProguard true } } ``` 4,使用上个月压缩包备份的好的项目代码也不能跑 已经尝试过了baidu google stackoverflow上很多方法还是没解决问题,求大神指教下,不剩感激
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
有哪些让程序员受益终生的建议
从业五年多,辗转两个大厂,出过书,创过业,从技术小白成长为基层管理,联合几个业内大牛回答下这个问题,希望能帮到大家,记得帮我点赞哦。 敲黑板!!!读了这篇文章,你将知道如何才能进大厂,如何实现财务自由,如何在工作中游刃有余,这篇文章很长,但绝对是精品,记得帮我点赞哦!!!! 一腔肺腑之言,能看进去多少,就看你自己了!!! 目录: 在校生篇: 为什么要尽量进大厂? 如何选择语言及方...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
英特尔不为人知的 B 面
从 PC 时代至今,众人只知在 CPU、GPU、XPU、制程、工艺等战场中,英特尔在与同行硬件芯片制造商们的竞争中杀出重围,且在不断的成长进化中,成为全球知名的半导体公司。殊不知,在「刚硬」的背后,英特尔「柔性」的软件早已经做到了全方位的支持与支撑,并持续发挥独特的生态价值,推动产业合作共赢。 而对于这一不知人知的 B 面,很多人将其称之为英特尔隐形的翅膀,虽低调,但是影响力却不容小觑。 那么,在...
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
白话阿里巴巴Java开发手册高级篇
不久前,阿里巴巴发布了《阿里巴巴Java开发手册》,总结了阿里巴巴内部实际项目开发过程中开发人员应该遵守的研发流程规范,这些流程规范在一定程度上能够保证最终的项目交付质量,通过在时间中总结模式,并推广给广大开发人员,来避免研发人员在实践中容易犯的错误,确保最终在大规模协作的项目中达成既定目标。 无独有偶,笔者去年在公司里负责升级和制定研发流程、设计模板、设计标准、代码标准等规范,并在实际工作中进行...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
redis分布式锁,面试官请随便问,我都会
文章有点长并且绕,先来个图片缓冲下! 前言 现在的业务场景越来越复杂,使用的架构也就越来越复杂,分布式、高并发已经是业务要求的常态。像腾讯系的不少服务,还有CDN优化、异地多备份等处理。 说到分布式,就必然涉及到分布式锁的概念,如何保证不同机器不同线程的分布式锁同步呢? 实现要点 互斥性,同一时刻,智能有一个客户端持有锁。 防止死锁发生,如果持有锁的客户端崩溃没有主动释放锁,也要保证锁可以正常释...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
Nginx 原理和架构
Nginx 是一个免费的,开源的,高性能的 HTTP 服务器和反向代理,以及 IMAP / POP3 代理服务器。Nginx 以其高性能,稳定性,丰富的功能,简单的配置和低资源消耗而闻名。 Nginx 的整体架构 Nginx 里有一个 master 进程和多个 worker 进程。master 进程并不处理网络请求,主要负责调度工作进程:加载配置、启动工作进程及非停升级。worker 进程负责处...
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法和技巧,包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等,会持续更新......
YouTube排名第一的励志英文演讲《Dream(梦想)》
Idon’t know what that dream is that you have, I don't care how disappointing it might have been as you've been working toward that dream,but that dream that you’re holding in your mind, that it’s po...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Java世界最常用的工具类库
Apache Commons Apache Commons有很多子项目 Google Guava 参考博客
相关热词 c# 图片上传 c# gdi 占用内存 c#中遍历字典 c#控制台模拟dos c# 斜率 最小二乘法 c#进程延迟 c# mysql完整项目 c# grid 总行数 c# web浏览器插件 c# xml 生成xsd
立即提问