1>JAVAC:警告:添加 xamari.support.v4 和 xamarin.support.v7.AppC 后,xamarin.android 中Scope.LIBRARY_GROUP未



在练习飞溅屏幕时,我会添加xamarin.support.v4软件包和xamarin.android.v7.appcompat,每个稀薄都很好,我会得到警告1> javac:javac:javac:警告:未知的enum constant scope.library_group我的代码运行良好:我的飞溅活动代码是:

enter code here
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Support.V7.App;
using System.Threading.Tasks;
using Android.Util;
namespace againCardview
{
[Activity(Label = "SplashActivity",MainLauncher =true,NoHistory                   =true,Theme = "@style/MyTheme.Splash")]
public class SplashActivity :AppCompatActivity
{
    string tag = "TAg" + typeof(SplashActivity).Name;
    public override void OnCreate(Bundle      savedInstanceState,PersistableBundle persist)
    {
        base.OnCreate(savedInstanceState,persist);
        Log.Debug(tag, "this is Oncreate method of splashActivity");
    }
    protected override void OnResume()
    {
        base.OnResume();
        var setartActivity = new Task(()=> {
            Log.Debug(tag, "Now App is starting");
            Task.Delay(50000);
            Log.Debug(tag, "now performing importing work");
        });
        setartActivity.ContinueWith(p => {
            Log.Debug(tag, "Starting App");
            StartActivity(new Intent(Application.Context,      typeof(MainActivity)));
        },TaskScheduler.FromCurrentSynchronizationContext());
    }
}

}

现在,我通过回到我的app/build.gradle依赖项中的Google Play服务的先前版本来解决此问题。此问题在更新到最新库后发生了我的问题,但要解决此问题:

dependencies {
    // there is a problem using 25.2.0: Warning:unknown enum constant Scope.LIBRARY_GROUP
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:design:24.2.1'
    compile 'com.android.support:support-v4:24.2.1'
    compile 'com.android.support:cardview-v7:24.2.1'
    compile 'com.android.support:recyclerview-v7:24.2.1'
    compile 'com.android.support:support-vector-drawable:24.2.1'
    compile 'com.android.support:support-annotations:24.2.1'
}

修复它下载xamarin.android.support.v7.appcompat 24.2.1。

最新更新