Android Studio项目运行的问题

tv源码相关的内容我找了很多版本的,之前试过跑过一些代码都飘红,昨天静下心来一个个解决这些飘红问题,就成功运行了几个tv项目,不过有些页面返回卡顿问题还待解决,今天就安卓项目运行问题总结一下。

Could not initialize class com.android.sdklib.repository.AndroidSdkHandler

在 build.gradle 中更新 gradle版本

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

Android Studio中Run按钮是灰色的解决

  1. 点击Run旁边 Select Run/Debug Configuration按钮
  2. 选择 Edit Configuration
  3. 在model下拉框中选择app.如果下拉框中没有app,那么请先去设置
    tools ->Android->sync project with gradles files;

    更新好后。回到这一步,model中选择app,就好

Android Studio Run/Debug configuration error: Module not specified

  1. 在项目的根文件夹中,打开文件进行编辑。settings.gradle

  2. 从文件中剪切行。include ‘:app’

  3. 在 Android Studio 上,单击“菜单”,然后选择 。FileSync Project with Gradle files

  4. 同步后,将回线粘贴到文件中。include ‘:app’settings.gradle

  5. 再次重新运行。Sync Project with Gradle files

org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin

在项目中的gradle.properties添加一句话:

android.overridePathCheck=true

本文系作者 @ 原创发布在 极客猿小兵的博客。未经许可,禁止转载。


极客猿小兵 » Android Studio项目运行的问题

发表回复