关于提示过时Api

时间:2023-01-19 19:28:55

今天是遇到studio 的第二个坑:当进行运行的时候报出了下边的错误。昨天睡觉没有休息好,今天来了又出现了bug ,感觉很是难受。

最后在一个qq好友的帮助下,解决了问题。

下边是错误信息:

Information:Gradle tasks [:app:assembleDebug]
Observed package id 'add-ons;addon-google_apis-google-23' in inconsistent location 'D:\sdk\add-ons\addon-google_apis-google-23-1' (Expected 'D:\sdk\add-ons\addon-google_apis-google-23')
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2400Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72400Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42400Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2400Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac
Full recompilation is required because at least one of the classes of 'android-support-v4.jar' is already present in classpath. Analysis took 0.01 secs.
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:prePackageMarkerForDebug
:app:transformClassesWithDexForDebug
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
:app:transformClassesWithDexForDebug FAILED
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> 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 'D:\jdk1.8.0_40\jdk1.8.0_40\bin\java.exe'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 5.28 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console




我的解决办法:直接删除掉从eclipse转过来的lib目录下的v4包。

然后在  c   + s + a + s 出现下边视图:


关于提示过时Api

关于提示过时Api



关于提示过时Api




感觉很是难过。哎