小编koe*_*525的帖子

即使我没有使用MySQL,ASP.NET也找不到MySQL主机

我想要一个简单的网页启动并运行,它使用TreeView以及SiteMapDataSource.TreeView用于列出Web应用程序上的链接.我的网站导航数据源是XML文件(Web.sitemap).

当我在我的Web浏览器中运行此应用程序时,我收到错误:"无法连接到任何指定的MySQL主机."

它说我的错误在285行:

Line 283:    <siteMap>
Line 284:      <providers>
Line 285:        <add name="MySqlSiteMapProvider" type="MySql.Web.SiteMap.MySqlSiteMapProvider, MySql.Web, Version=6.9.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
Line 286:      </providers>
Line 287:    </siteMap>
Run Code Online (Sandbox Code Playgroud)

源文件:C:\ Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config行:285

我没有使用MySQL或任何RDBMS作为我的站点地图,所以我不确定为什么我会收到此错误.我在我的系统上安装了MySQL,以及Visual Studio 2015的插件,所以这可能是问题吗?

谢谢.

c# asp.net treeview

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

从1.5升级后,应用程序将无法在Android Studio 2.0下运行

我最近将Android Studio从1.5升级到2.0.我的应用程序将在Android 1.5上构建并运行良好.现在,当我尝试在智能手机上运行应用程序时,它会给我这个错误:

Error:Execution failed for task ':app:transformClassesWithInstantRunForDebug'.
> 24
Run Code Online (Sandbox Code Playgroud)

在Android Studio 2.0上打开我的项目时,会出现一个消息框,告诉我将我的gradle升级到版本2,我做了.我不知道为什么我会收到这个错误.

这是我尝试在手机上运行应用程序时获得的输出:

Executing tasks: [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:clean UP-TO-DATE
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2321Library
:app:prepareComAndroidSupportAppcompatV72321Library
:app:prepareComAndroidSupportCardviewV72321Library
:app:prepareComAndroidSupportDesign2321Library
:app:prepareComAndroidSupportMediarouterV72300Library
:app:prepareComAndroidSupportRecyclerviewV72321Library
:app:prepareComAndroidSupportSupportV42321Library
:app:prepareComAndroidSupportSupportVectorDrawable2321Library
:app:prepareComGoogleAndroidGmsPlayServices840Library
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library …
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio-2.0

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

ExoPlayer-在播放音频剪辑的整个过程中显示PlayerControlView

我最近将ExoPlayer添加到了我的Android项目中。有了他们的网站,设置它并播放音频剪辑相对简单。我可以从我的API中获取音频文件并进行播放,但是问题是,播放开始后PlayerControlView消失了。有没有一种方法可以强制PlayerControlView在音频剪辑的整个播放过程中停留?这是包含PlayerControlView的片段的XML:

<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".SetupWizard.NewHouseInformationFragment"
android:orientation="vertical">
<TextView android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="5dp"
    app:layout_constraintTop_toTopOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    android:text="@string/why_join_a_house_string"
    android:fontFamily="sans-serif-light"
    android:textColor="@android:color/black"
    android:id = "@+id/HouseDescriptionTitleTextView"
    />
<TextView
    android:id = "@+id/WhyCreateHouseTitleTextView"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textSize="18sp"
    android:fontFamily="sans-serif-medium"
    android:text="@string/why_create_house_string"
    android:textColor="@android:color/black"
    app:layout_constraintTop_toBottomOf="@id/HouseDescriptionTitleTextView"
    android:layout_margin="5dp"/>
<TextView
    android:fontFamily="sans-serif-light"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/manage_your_niche_network"
    android:drawableStart="@drawable/ic_check"
    android:drawablePadding="5dp"
    android:layout_margin="5dp"
    android:id = "@+id/CreateNicheNetworksTextView"
    android:textColor="@android:color/black"
    app:layout_constraintTop_toBottomOf="@id/WhyCreateHouseTitleTextView"/>
<TextView
    android:fontFamily="sans-serif-light"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textColor="@android:color/black"
    android:text="@string/share_content_string"
    android:drawableStart="@drawable/ic_check"
    android:drawablePadding="5dp"
    android:layout_margin="5dp"
    android:id = "@+id/ShareMultimediaTextView"
    app:layout_constraintTop_toBottomOf="@id/CreateNicheNetworksTextView"
    />
<TextView
    android:fontFamily="sans-serif-light"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:textColor="@android:color/black"
    android:text="@string/send_broadcasts_messages"
    android:id = "@+id/SendBroadcastsTextView"
    android:layout_margin="5dp"
    android:drawableStart="@drawable/ic_check"
    android:drawablePadding="5dp"
    app:layout_constraintTop_toBottomOf="@id/ShareMultimediaTextView"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintEnd_toEndOf="parent"
    /> …
Run Code Online (Sandbox Code Playgroud)

android exoplayer

3
推荐指数
1
解决办法
1442
查看次数

Android ViewPager 在 TabLayout 上显示视图

我正在尝试在 TabLayout 中设置两个选项卡。第一个选项卡是显示配置文件,第二个选项卡是显示活动。我有 TabLayout 和 ViewPager 设置。我还创建了将两个片段链接到 tablayout 所需的适配器。当我在我的手机上运行它时,两个屏幕和选项卡会显示,但它们不会显示在选项卡区域内 - 它们覆盖了实际的选项卡。我正在使用设计支持库 (v23.1.1)

我有一个带有片段区域的主活动文件,它根据用户想要做什么来改变视图。

我该怎么做才能让标签内容显示在标签内部而不是标签顶部?这是我的代码:

编辑:这是 profile_fragment.xml 文件(这是我希望选项卡出现的地方):

<RelativeLayout 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="Fragments.ProfileFragment">

<!-- TODO: Update blank fragment layout -->
<android.support.design.widget.TabLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id = "@+id/ProfileTabLayout"
    android:background="@color/colorPrimary"
    app:tabGravity="fill"
    app:tabMode="fixed"
    app:tabTextColor="@color/colorIcons"
    >
</android.support.design.widget.TabLayout>
<android.support.v4.view.ViewPager
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id = "@+id/ProfilePager"
    ></android.support.v4.view.ViewPager>
Run Code Online (Sandbox Code Playgroud)

user_profile_tab_layout.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">
    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/colorPrimaryLight"
        android:layout_alignParentTop="true">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">
            <ImageView
                android:layout_width="100dp"
                android:layout_height="100dp"
                android:layout_gravity="center"
                android:src="@drawable/person_profile"
                android:layout_margin="5dp"/>
            <TextView
                style="@style/TextViewStyle"
                android:id = "@+id/userTitleTextView"
                android:textSize="24sp"
                android:textStyle="bold" …
Run Code Online (Sandbox Code Playgroud)

tabs android android-fragments android-tablayout

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