在升级之前甚至在最新的Gradle升级之后,Gradle同步失败

时间:2020-07-18 11:02:29

标签: android android-studio gradle gradle-plugin

Blockquote

我面临的错误:我使用最新的Android Studio版本4.0.0,无法同步gradle,因此我升级了最新的gradle版本6.5.1并放置在路径[c / program files / android / gradle / gradle 6.5中.1 /] .... iam更新后仍无法同步错误。.任何人都可以帮助我解决这个错误

the bitnami documentation

this issue

project structure

1 个答案:

答案 0 :(得分:0)

您可以删除 mRecyclerView.addOnScrollListener ( new RecyclerView.OnScrollListener ( ) { @Override public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { super.onScrolled(recyclerView, dx, dy); visibleItemCount = layoutManager.getChildCount(); totalItemCount = layoutManager.getItemCount(); pastVisibleItems = layoutManager.findFirstVisibleItemPosition(); if(dy>0) { if(isLoading){ if (totalItemCount>previous_total){ isLoading = false; previous_total = totalItemCount; } } if (!isLoading&&(totalItemCount-visibleItemCount)<=(pastVisibleItems+view_threshold)) { page_number++; performPagination(); isLoading = true; progressBar = findViewById ( R.id.progressBar ); progressBar.setIndeterminate (true); progressBar.setVisibility(View.VISIBLE); } } if(dy > 0 && bottomNavigationView.isShown ()){ bottomNavigationView.setVisibility ( View.GONE ); }else if(dy < 0){ bottomNavigationView.setVisibility ( View.VISIBLE ); } } @Override public void onScrollStateChanged(@NonNull RecyclerView recyclerView, int newState) { super.onScrollStateChanged ( recyclerView, newState ); } } );

然后升级

/project_directory/.gradle folder

classpath 'com.android.tools.build:gradle:4.0.1' -确保您停止 FYI FireWall

最后 Anti- Virus