本人业余爱好
我用讯飞开放平台
离线语音合成 Android SDK 文档 | 讯飞开放平台文档中心
离线语音合成 我看文档File → new → import project →mscV5PlusDemo
出错后 改了一下 build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
//版本号请根据自己的gradle插件版本号自行更改
// classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.android.tools.build:gradle:3.6.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
然后一运行 有以下提示 :
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s
16 actionable tasks: 14 executed, 2 up-to-date
没看懂怎么回事? 我试过 3_4_0 和 3_6_3 都不行,其他的版本我也不知道在哪看(帖子含有小数点发不了 )
还有他们的论坛发不了帖子呢?我用火狐和Google浏览器都不行
望采纳!!新年快乐。
这里配置 gradle 8.0 哦,你的日志里面提示使用 gradle 8.0,另外 build.gradle 里面的 classpath 设置的 gradle 插件版本,请先在 gradle-wrapper.properties 里面配置完之后,同步下载完成,再点开 build.gradle,鼠标悬浮在 gradle 插件版本上,会提示你更新到某个版本,修改再重新点击同步即可。
在Gradle 7.0,不支持compile了,所以,在build.gradle文件中,将compile改为implementation,问题就解决了。
修改build.gradle 中的compileSdkVersion与targetSdkVersion试过吗。
如果还是不行就将本地的gradle版本退回与项目相符合的版本。或者 使用项目下自带的gradle.bat(windows平台)或gradle(linux平台)来运行项目
我写7.2.0 好像 好像问题通过了 但是又提示:import com.iflytek.cloud.ErrorCode; 这个引用不到!!cloud是标红的
然后import androidx.core.app.ActivityCompat; core是标红的 我知道大概是没找到库 ,但是如何增加引用呢? 太业余了哈.........