当前位置: 首页 > news >正文

windows安装android studio

下载

https://developer.android.google.cn/studio?hl=zh-cn
在这里插入图片描述

安装

在这里插入图片描述
在这里插入图片描述
打开cmd输入如下命令

android-studio-2024.1.1.12-windows.exe /NCRC 

在这里插入图片描述

注意 运行命令后可能还报错,但是会出现弹窗

如果还是报错可以选择zip
在这里插入图片描述
运行
在这里插入图片描述
不设置代理
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
等待下载即可,安装完成
在这里插入图片描述
新建项目
在这里插入图片描述
在这里插入图片描述
第一次耐心等待
在这里插入图片描述

在这里插入图片描述
点击运行
在这里插入图片描述
在这里插入图片描述
即可运行成功,不过这个版本是kotlin版本的,我想换成java版本
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
res下新建layout文件夹,该文件夹下新建activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World WWW!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

java下新建MainActivity.java

package com.example.mysendapp;

import android.os.Bundle;
import android.util.Log;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.d("Main", "onCreate:aaa");
        setContentView(R.layout.activity_main);
    }
}

修改AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <application
        android:allowBackup="true"
        android:dataExtractionRules="@xml/data_extraction_rules"
        android:fullBackupContent="@xml/backup_rules"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.MySendApp"
        tools:targetApi="31">
        <activity
            android:name=".MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>

在这里插入图片描述
运行项目
在这里插入图片描述

相关文章:

  • 【ai】Easy-RAG 不行啊,RAGFlow官方demo行
  • 分布式日志
  • Vue是如何实现nextTick的?
  • Dockerfile搭建LNMP
  • 用Python实现9大回归算法详解——01. 线形回归算法
  • 《工厂模式在软件开发中的深度剖析与应用》
  • 苹果在iOS 18.1中向第三方开发者开放iPhone的NFC芯片
  • JavaScript AI 编程助手
  • Android之service两种启动方式的异同
  • 【自动驾驶】ROS远程节点的分布式通信
  • 【TiDB】09-修改tidb客户端访问密码
  • Lambda表达式与流式编程
  • 具有 SAM2 分段的 NDVI 无人机
  • MyBatis源码系列3(解析配置文件,创建SqlSessionFactory对象)
  • FPGA开发——UART回环实现之发送模块的设计和数据回环整体实现
  • 革新测试管理:集远程、协同、自动化于一身的统一测试管理平台
  • ubuntu20.04 安装docker
  • [C#]基于winform结合photocartoon算法实现人物卡通化源码实现
  • 安全基础学习-RC4加密算法
  • 加密狗创新解决方案助力工业自动化
  • 德国新一届联邦政府宣誓就职
  • 江西省文化和旅游厅厅长梅亦已任省委宣传部副部长
  • 贵州召开全省安全生产电视电话会议:以最严要求最实举措守牢安全底线
  • 马克思主义理论研究教学名师系列访谈|王公龙:做好马克思主义研究,既要“钻进去”又要“跳出来”
  • 多地政府机关食堂迎来大客流,重庆荣昌区委书记给厨师们鼓劲
  • 巴基斯坦宣布禁止与印度的进口贸易