安装Android Studio教程

https://blog.csdn.net/aiqq136/article/details/122663018

Helloworld

 

新建项目

Name项目名字
Package name包名:一般为网址倒写
Save location保存位置
Language使用语言
Minimum SDK最低版本支持

 

 创建自己的虚拟设备

 

 下载安卓镜像

 

 

 

使用系统

启动虚拟机

 转换成简体中文

 

 

 

 

测试helloworld

 错误1:因为没有授权SDK导致证书出错,解决办法:

ERROR: Failed to install the following Android SDK packages as some licences have not been accepted.

ERROR: Failed to install the following Android SDK packages as some licences have not been accepted._奔跑的痕迹的博客-CSDN博客https://blog.csdn.net/qq_34817440/article/details/100060319?spm=1001.2101.3001.6661.1&utm_medium=distribute.pc_relevant_t0.none-task-blog-2~default~BlogCommendFromBaidu~HighlightScore-1.queryctrv2&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2~default~BlogCommendFromBaidu~HighlightScore-1.queryctrv2&utm_relevant_index=1

错误2:因为java版本过高导致的错误:

Exception in thread “main“ java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
	at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
	at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
	at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
	at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

解决办法:

卸载电脑上所有的java

安装JAVA jdk1.8

Exception in thread “main“ java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema_mn24596mn的博客-CSDN博客https://blog.csdn.net/mn24596mn/article/details/110847163

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐