wordpress架设专题类网站谷哥做网站 是如何推广的
wordpress架设专题类网站,谷哥做网站 是如何推广的,深圳优化seo排名,SEO网站链接模型1、使用 idea 创建 android 工程 2、 配置构建 sdk 3、配置 gradle
a、进入 gradle 官网#xff0c;选择 install #xff08;默认是最新版本#xff09; b、选择包管理安装#xff0c;手动安装选择下面一个即可 c、安装 sdk 并通过 sdk 安装 gradle
安装 sdk#xff1a…1、使用 idea 创建 android 工程 2、 配置构建 sdk 3、配置 gradle
a、进入 gradle 官网选择 install 默认是最新版本 b、选择包管理安装手动安装选择下面一个即可 c、安装 sdk 并通过 sdk 安装 gradle
安装 sdkcurl -s https://get.sdkman.io | bash 根据安装提示执行 source 命令使 sdkman 生效
source /Users/xxxx/.sdkman/bin/sdkman-init.sh
然后执行 gradle 安装命令 安装成功 4、下载软件 Genymotion并在IDEA安装一个Genymotion插件与之关联起来
a、下载安装 adb
模拟器下载地址Genymotion Desktop download - Genymotion Android Emulator
配置自己下载安装的 android sdk 路径 b、安装插件 配置模拟器路径 5、配置完成执行命令打包构建
gradle assembleDebug 打包出现异常如下
Starting a Gradle Daemon (subsequent builds will be faster)FAILURE: Build failed with an exception.* What went wrong:
A problem occurred configuring root project My Application.Could not resolve all files for configuration :classpath. Could not resolve com.android.tools.build:gradle:8.2.2.Required by:project : com.android.application:com.android.application.gradle.plugin:8.2.2 No matching variant of com.android.tools.build:gradle:8.2.2 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute org.gradle.plugin.api-version with value 8.6 but:- Variant apiElements capability com.android.tools.build:gradle:8.2.2 declares a library, packaged as a jar, and its dependencies declared externally:- Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8- Other compatible attribute:- Doesnt say anything about org.gradle.plugin.api-version (required 8.6)- Variant javadocElements capability com.android.tools.build:gradle:8.2.2 declares a component for use during runtime, and its dependencies declared externally:- Incompatible because this component declares documentation and the consumer needed a library- Other compatible attributes:- Doesnt say anything about its target Java version (required compatibility with Java 8)- Doesnt say anything about its elements (required them packaged as a jar)- Doesnt say anything about org.gradle.plugin.api-version (required 8.6)- Variant runtimeElements capability com.android.tools.build:gradle:8.2.2 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:- Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8- Other compatible attribute:- Doesnt say anything about org.gradle.plugin.api-version (required 8.6)- Variant sourcesElements capability com.android.tools.build:gradle:8.2.2 declares a component for use during runtime, and its dependencies declared externally:- Incompatible because this component declares documentation and the consumer needed a library- Other compatible attributes:- Doesnt say anything about its target Java version (required compatibility with Java 8)- Doesnt say anything about its elements (required them packaged as a jar)- Doesnt say anything about org.gradle.plugin.api-version (required 8.6)* Try:Review the variant matching algorithm at https://docs.gradle.org/8.6/userguide/variant_attributes.html#sec:abm_algorithm.No matching variant errors are explained in more detail at https://docs.gradle.org/8.6/userguide/variant_model.html#sub:variant-no-match.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 22s
根据异常提示Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
发现gradle 使用的是默认的 jdk8 版本与工程要求的 11 版本不一致
2种解决方式如下
1、gradle.properties 中 指定 jdk 版本org.gradle.java.home/Applications/Android\ Studio.app/Contents/jbr/Contents/Home
2、在命令行中指定
gradle -Dorg.gradle.java.home/Applications/Android\ Studio.app/Contents/jbr/Contents/Home assembleDebug 解决后再次打包即可完成
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/bicheng/86842.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!