JAVAC : warning : unknown enum constant Scope.LIBRARY_GROUP in Xamarin.Android after adding Xamarin.Support.v4 and Xamarin.Support.v7.AppC
Asked Answered
B

3

1

While practicing splash screen I added Xamarin.Support.v4 package and Xamarin.Android.v7.appcompat; everything is fine, I am just getting this warning:

1>JAVAC : warning : unknown enum constant Scope.LIBRARY_GROUP

and my code is working well. my code of splash activity is:

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());
       
    }
}

}

Buckthorn answered 28/2, 2017 at 14:45 Comment(2)
It was not help full to me I have tried to install previous version of packages but no improvement please suggest me better solutionBuckthorn
my app is not loading next activity that is MainActivity Its just showing splash screenBuckthorn
B
4

For now I solved this by rolling back to the previous version of Google Play Services in my app/build.gradle dependencies. This problem happened to me after updating to the latest libraries, but goes away with this:

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'
}
Bartlett answered 3/3, 2017 at 20:12 Comment(1)
If you use the material design settings fix, you will need to update that as well. // use a material design hack for the Settings // github.com/Gericop/Android-Support-Preference-V7-Fix compile ('com.takisoft.fix:preference-v7:24.2.1.0') { exclude group: 'com.android.support', module: 'appcompat-v7' }Bartlett
C
2

to fix it download xamarin.Android.Support.V7.AppCompat 24.2.1 .

Chivalrous answered 16/4, 2017 at 20:13 Comment(0)
E
0

On my side, I also met the problem with React-Native The fix :

Moving from

implement "androidx.annotation:annotation:28.0.0"

to the latest version of annotation at this date :

implement "androidx.annotation:annotation:1.7.1"

Eltonelucidate answered 17/4, 2024 at 13:48 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.