Android Studio 3.5 and newer ?

老子按照tensorflow/exampels上给出的实例,没有一个能在安卓上编译成功的,真是心累。幸好组里有个大佬编译成功了,于是将他的project copy过来,然而并不顺利,configure build失败,告诉我路径有问题,不是utf-8的,难道是因为里面有中文?因此我又将project复制到另外一个文件夹下,但这次仍旧失败,connection reset ??再次编译后来提醒我这个项目在我的安卓上不适合,需要3.5甚至更新的版本,我去。直接在Android Studio Help里面check update 结果把我的项目全给删了,我去,幸亏不是啥特别重要的东西,也都有备份。但update过程出现conflict,要我选择cancel或proceed,我选的后者,结果仍旧编译失败,于是,直接卸载AS,重新安装3.5的。

官网在此:https://developer.android.google.cn/studio

这个我选择的cancel,其他都是按照默认的操作的。

我特么又没成功。不知道说什么了,为啥别人都是一帆风顺,而我每次都要进坑????这特么也是醉了。

ERROR: Connection reset。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。

和之前同样的错误。问了下大佬,大佬说“无他,一直try again”。

Gradle Sync这玩意是什么鬼?

大佬的没问题,我一试新的就有问题,比如这个

错误: 程序包com.google.android.material.bottomsheet不存在

import com.google.android.material.bottomsheet.BottomSheetBehavior;

我特么看到下载,那就下载东西(找到错误位置,点击TheadPool)

我都下载了还是不行,Android API 28 Platform 没有发现??我看见右下角有啥update,我就update下

错误: 程序包com.google.android.material.bottomsheet不存在。。。还是这个玩意,我要疯了。。。。。

16:11    Gradle sync failed: Unable to start the daemon process.
            This problem might be caused by incorrect configuration of the daemon.
            For example, an unrecognized jvm option is used.
            Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/5.4.1/userguide/gradle_daemon.html
            Process command line: D:\Java\jdk\bin\java.exe -Xmx1536m -Dfile.encoding=GBK -Duser.country=CN -Duser.language=zh -Duser.variant -cp C:\Users\xulm1\.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx\gradle-5.4.1\lib\gradle-launcher-5.4.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.4.1
            Please read the following process output to find out more:
            -----------------------
            Error occurred during initialization of VM
            Could not reserve enough space for 1572864KB object heap
            (384 ms)

安卓的东西用我之前装的Java的东西了??搞错了吧。装了Android Studio 就不能装Java了?我先刚才点击了一个操作,使得Android Studio 用的Java的jdk,MD,这下全都不能编译了,之前成功的项目都不行了。重新安装AS。

卧槽。幸亏没删之前的安装包。作为一个菜鸟,随时都有可能重新来过,不要害怕。这玩意也能玩一整天,安装,卸载,安装。

又出现了那个玩意,千万不要点击第二行set 。。use the same JDK ,点了就重新安装AS吧

16:45    Android Studio is using this JDK location:
            D:\android2\jre
            which is different to what Gradle uses by default:
            D:\Java\jdk
            Using different locations may spawn multiple Gradle daemons if
            Gradle tasks are run from command line while using Android Studio.
            More info...
            Set Android Studio to use the same JDK as Gradle and sync project
            Do not show this warning again
 

老子换了个库,不是导入那个玩意失败吗?

换下就成功了,我还是聪明的娃。不过放在手机端不能用,已经停止运行。。。。

import android.support.design.widget.BottomSheetBehavior;

也是醉了

我在依赖库中导入

implementation 'com.google.android.material:material:1.0.0-alpha1'

结果报错:

ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
    is also present at [androidx.core:core:1.0.0-alpha1] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
    Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:9:5-26:19 to override.
 

另外有相关问题可以加入QQ群讨论,不设微信群

QQ群:868373192 

语音深度学习及信号处理群

发布了240 篇原创文章 · 获赞 233 · 访问量 7万+

猜你喜欢

转载自blog.csdn.net/SPESEG/article/details/101350449