Settings | Sign in | Sign up

The author has 50 posts.

Android Studio 3.5.3下載地址

Floor 11 巨大八爪鱼 8/18/25 15:23
Floor 12 巨大八爪鱼 8/18/25 16:00
解決Android studio 3.5.3出現Cause: unable to find valid certification path to requested target 報錯的問題

修改根目錄(注意是根目錄!!!不是app工程下面)下的build.gradle,整個文件替換成如下內容:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}

    }

    dependencies {

        classpath 'com.android.tools.build:gradle:3.5.3'


        // NOTE: Do not place your application dependencies here; they belong

        // in the individual module build.gradle files

    }

}

allprojects {

    repositories {

//    google()

//    jcenter()

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }

        maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter'}

    }

}


然後就同步成功了。

巨大八爪鱼: 參考資料:https://www.jb51.net/article/182527.htm

classpath 'com.android.tools.build:gradle:3.6.1'

這個classpath必須要根據android studio版本來設置。

Floor 13 巨大八爪鱼 8/18/25 16:03

gradle同步成功後,就可以進入design view了。

Floor 14 巨大八爪鱼 8/18/25 16:04

我選擇的是Consolas 12號字體。

Floor 15 巨大八爪鱼 8/18/25 16:05
Floor 16 巨大八爪鱼 8/18/25 16:09
Floor 17 巨大八爪鱼 8/18/25 16:10
Floor 18 巨大八爪鱼 8/18/25 16:12
Floor 19 巨大八爪鱼 8/18/25 16:16
Floor 20 巨大八爪鱼 8/18/25 16:38

Build->Make Project失敗:

AAPT: aapt2.exe E 08-18 16:31:50  2092  5656 LoadedArsc.cpp:112] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.

aapt2.exe E 08-18 16:31:50  2092  5656 ApkAssets.cpp:157] Failed to load 'resources.arsc' in APK 'C:\Documents and Settings\Administrator\AppData\Local\Android\Sdk\platforms\android-36\android.jar'.

error: failed to load include path C:\Documents and Settings\Administrator\AppData\Local\Android\Sdk\platforms\android-36\android.jar.


解決辦法:打開Gradle Scripts下面的build.gradle (Module: app)。

compileSdkVersion改成28

buildToolsVersion改成"28.0.3"    

targetSdkVersion改成28

然後Sync一下再Build->Make Project,就成功了。

可以在F:\Projects\AndroidStudioProjects\MyApplication\app\build\outputs\apk\debug下成功生成app-debug.apk。


如果報下面的錯誤,點擊Install missing SDK package(s)連結接受一下裏面的協議就行了。

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

   platforms;android-15 Android SDK Platform 15

   build-tools;28.0.3 Android SDK Build-Tools 28.0.3

To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.

Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html


Using Android SDK: C:\Documents and Settings\Administrator\AppData\Local\Android\Sdk

Install missing SDK package(s)

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.