pichillilorenzo / flutter_inappwebview

A Flutter plugin that allows you to add an inline webview, to use a headless webview, and to open an in-app browser window.
https://inappwebview.dev
Apache License 2.0
3.21k stars 1.57k forks source link

Build Error #298

Open arashAndroid opened 4 years ago

arashAndroid commented 4 years ago

Environment

Flutter version: Flutter 1.12.13+hotfix.5 • channel stable Plugin version: master Android version: Building debug apk or running on android 8.0which -->

Description

Expected behavior: Create debug apk after running flutter build apk --debug Current behavior: Error : A problem occurred configuring project ':flutter_inappwebview'.

    `FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':flutter_inappwebview'.
> Could not resolve all artifacts for configuration ':flutter_inappwebview:classpath'.
   > Could not find builder.jar (com.android.tools.build:builder:3.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.3.2/builder-3.3.2.jar
   > Could not find tracker.jar (com.android.tools.analytics-library:tracker:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/tracker/26.3.2/tracker-26.3.2.jar
   > Could not find shared.jar (com.android.tools.analytics-library:shared:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/shared/26.3.2/shared-26.3.2.jar
   > Could not find gradle-api.jar (com.android.tools.build:gradle-api:3.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle-api/3.3.2/gradle-api-3.3.2.jar
   > Could not find manifest-merger.jar (com.android.tools.build:manifest-merger:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/manifest-merger/26.3.2/manifest-merger-26.3.2.jar     
   > Could not find sdk-common.jar (com.android.tools:sdk-common:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/sdk-common/26.3.2/sdk-common-26.3.2.jar
   > Could not find builder-test-api.jar (com.android.tools.build:builder-test-api:3.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-test-api/3.3.2/builder-test-api-3.3.2.jar     
   > Could not find ddmlib.jar (com.android.tools.ddms:ddmlib:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/ddms/ddmlib/26.3.2/ddmlib-26.3.2.jar
   > Could not find sdklib.jar (com.android.tools:sdklib:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/sdklib/26.3.2/sdklib-26.3.2.jar
   > Could not find layoutlib-api.jar (com.android.tools.layoutlib:layoutlib-api:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/layoutlib/layoutlib-api/26.3.2/layoutlib-api-26.3.2.jar     
   > Could not find dvlib.jar (com.android.tools:dvlib:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/dvlib/26.3.2/dvlib-26.3.2.jar
   > Could not find repository.jar (com.android.tools:repository:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/repository/26.3.2/repository-26.3.2.jar
   > Could not find common.jar (com.android.tools:common:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/common/26.3.2/common-26.3.2.jar
   > Could not find jetifier-processor.jar (com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-processor/1.0.0-beta02/jetifier-processor-1.0.0-beta02.jar
   > Could not find bundletool.jar (com.android.tools.build:bundletool:0.6.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/bundletool/0.6.0/bundletool-0.6.0.jar
   > Could not find jetifier-core.jar (com.android.tools.build.jetifier:jetifier-core:1.0.0-beta02).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/jetifier/jetifier-core/1.0.0-beta02/jetifier-core-1.0.0-beta02.jar
   > Could not find builder-model.jar (com.android.tools.build:builder-model:3.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/builder-model/3.3.2/builder-model-3.3.2.jar
   > Could not find protos.jar (com.android.tools.analytics-library:protos:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/analytics-library/protos/26.3.2/protos-26.3.2.jar
   > Could not find apkzlib.jar (com.android.tools.build:apkzlib:3.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/apkzlib/3.3.2/apkzlib-3.3.2.jar
   > Could not find apksig.jar (com.android.tools.build:apksig:3.3.2).  
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/build/apksig/3.3.2/apksig-3.3.2.jar
   > Could not find annotations.jar (com.android.tools:annotations:26.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/tools/annotations/26.3.2/annotations-26.3.2.jar
   > Could not find databinding-common.jar (androidx.databinding:databinding-common:3.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/3.3.2/databinding-common-3.3.2.jar    
   > Could not find baseLibrary.jar (com.android.databinding:baseLibrary:3.3.2).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/com/android/databinding/baseLibrary/3.3.2/baseLibrary-3.3.2.jar
> Could not get unknown property 'android' for project ':flutter_inappwebview' of type org.gradle.api.Project.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan 
to get full insights.

* Get more help at https://help.gradle.org

Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                         3.1s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the     
incompatibility.
✏️  Creating `android\settings_aar.gradle`...                        2ms
√ `android\settings_aar.gradle` created successfully.
Building plugin flutter_inappwebview...
The plugin flutter_inappwebview could not be built due to the issue above.
Running Gradle task 'assembleAarRelease'...                            -`

Steps to reproduce

Create new project with flutter create --androidx test12 then add inappwebview to pubspec.yaml (either master or latest version) Then run flutter build apk --debug

Important Note

I have recently changed my windows to windows 10. I tried this on windows 8.1 on 2 other devices and it works there. Maybe it is because of the cache or something. I have turned off the firewall and defender.

Please help. I have been fighting this for 3 days. I can't sleep well :( .

cacing69 commented 4 years ago

bump....have same problem here, migrate my project to androidx and failed to build

image

arashAndroid commented 4 years ago

bump....have same problem here, migrate my project to androidx and failed to build

image

Well I did not find a good solution for this, but, I did something that worked. I cloned my project on a windows 8.1 system and run flutter build apk --debug. It did build successfully (Using a VPN). Then I copied the flutter sdk folder from win 8 to my win 10. Then it worked on my win 10 too and I was able to build the app. You need to use a VPN in some countries that are banned (When building for the first time).