相关疑难解决方法(0)

错误:(30,13)无法解决:com.android.support.constraint:constraint-layout:1.0.0-alpha4

在此输入图像描述

错误:(30,13)无法解决:com.android.support.constraint:constraint-layout:1.0.0-alpha4

android

11
推荐指数
2
解决办法
2万
查看次数

使用约束库的版本1.0.0-alpha7,这是过时的

我开始使用Android Studio 2.2并尝试使用ConstraintLayout但是当我让android studio自动添加它时它会向我显示该错误

Using version 1.0.0-alpha7 of the constraint library, which is obsolete
Run Code Online (Sandbox Code Playgroud)

当我尝试使用快速修复升级它时,我得到了这个错误

Error:Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha8.
Run Code Online (Sandbox Code Playgroud)

我认为这是Android Studio中的一个错误.我该怎么做才能解决这个问题?

我目前的解决方案是抑制错误.

android android-layout android-studio

8
推荐指数
2
解决办法
4270
查看次数

Android Studio 3.1.3存在Constraint布局问题

我正在尝试在这里开始一个新项目,但这个问题正在出现.我可以运行该项目并将其部署在模拟器中,但是这个渲染问题和使用私有资源正在打扰我.我已经尝试过在互联网上找到的所有可能的解决方案,但它无法解决问题

<?xml version="1.0" encoding="utf

<android.support.constraint.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"
   app:layout_behavior="@string/appbar_scrolling_view_behavior"
   tools:context=".MainActivity"
   tools:showIn="@layout/activity_main">

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello World!" />

</android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)

样式

<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>


</style>

<style name="AppTheme.NoActionBar">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />

<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
Run Code Online (Sandbox Code Playgroud)

的build.gradle

apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.acer.myapplication3"
        minSdkVersion 15
        targetSdkVersion 28 …
Run Code Online (Sandbox Code Playgroud)

android android-studio android-studio-3.1.3

8
推荐指数
1
解决办法
1万
查看次数