android studio 为啥创建项目都是6.0的项目?都是继承appcompatactiv
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android studio 为啥创建项目都是6.0的项目?都是继承appcompatactiv相关的知识,希望对你有一定的参考价值。
参考技术A androidstudio
6.0默认是继承这个,如果你自己不想用这个,可以改成activity 参考技术B 新建android
项目的时候可以选择版本的。继承appcompatactity是android
默认的。
自己可以更改,直接集成Activity的。我也是开发android的。希望采纳!
为啥在我创建新项目时会在 android studio 中出现此错误?
【中文标题】为啥在我创建新项目时会在 android studio 中出现此错误?【英文标题】:why this errors in android studio occurred when i create new project?为什么在我创建新项目时会在 android studio 中出现此错误? 【发布时间】:2016-12-10 06:31:10 【问题描述】:IDE 致命错误:
插件 Android 支持 中的异常。 3 分钟前。自上次清除以来发生过一次。未读。禁用插件...
错误信息:
Parse exception while reading distributions.json: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
Details:
Parse exception while reading distributions.json: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
at com.google.gson.Gson.fromJson(Gson.java:822)
at com.google.gson.Gson.fromJson(Gson.java:775)
at com.google.gson.Gson.fromJson(Gson.java:724)
at com.android.tools.idea.stats.DistributionService.loadDistributionsFromJson(DistributionService.java:319)
at com.android.tools.idea.stats.DistributionService.loadFromFile(DistributionService.java:297)
at com.android.tools.idea.stats.DistributionService.loadStatsSynchronously(DistributionService.java:222)
at com.android.tools.idea.stats.DistributionService.access$000(DistributionService.java:54)
at com.android.tools.idea.stats.DistributionService$2.run(DistributionService.java:194)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
Caused by: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginArray(JsonReader.java:350)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:79)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60)
at com.google.gson.Gson.fromJson(Gson.java:810)
... 21 more
【问题讨论】:
【参考方案1】:试试这个:
打开 Android Studio 终端类型 gradlew
C:\ProjectDir> gradlew
如果出错使用此命令:(使用代理)
gradlew -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8580
【讨论】:
以上是关于android studio 为啥创建项目都是6.0的项目?都是继承appcompatactiv的主要内容,如果未能解决你的问题,请参考以下文章
为啥一个 Android Studio 项目中有两个 build.gradle 文件?
为啥 Android Studio 创建的 APK 比 Eclipse 创建的 APK 大?