klutter-dart icon indicating copy to clipboard operation
klutter-dart copied to clipboard

i am getting below error when i run this command : flutter pub run klutter:producer install=platform

Open vishwaprojects opened this issue 1 year ago • 10 comments

i am following tutorial by klutter ( https://buijs.dev/klutter-2/)

KLUTTER: Received invalid command.

The following commands are valid: flutter pub run klutter:consumer add lib=foo_example flutter pub run klutter:consumer init flutter pub run klutter:producer init flutter pub run klutter:producer init bom= (default is 2023.3.1.beta) flutter pub run klutter:producer init flutter= (default is 3.10.6) flutter pub run klutter:producer init flutter= bom= flutter pub run klutter:producer get flutter= (one of versions: {3.0.5, 3.3.10, 3.7.12, 3.10.6})

vishwaprojects avatar Apr 21 '24 16:04 vishwaprojects

Hm tutorial is a bit outdated. Did you follow the tutorial literally or did you use newer dependency versions?

Which command gave this error?

buijs-dev avatar Apr 21 '24 17:04 buijs-dev

i followed each and every step of the tutorial , every step successfully ran but struck at step 3 could you please update the tutorial or suggest me some blogs or tutorials would be a great help i am trying this since 2 days

thank you

vishwaprojects avatar Apr 22 '24 05:04 vishwaprojects

For now you can check the cookbook examples. I am refactoring the project and will update the tutorials when done, but because this is just a side project it takes a while...

buijs-dev avatar Apr 22 '24 11:04 buijs-dev

thank you @buijs-dev , if you need any help from my side, i am ready to help you , this project will become big for sure

vishwaprojects avatar Apr 22 '24 11:04 vishwaprojects

@vishwaprojects 2024.1.2 is released. Could you have a look at the cookbook examples and run them locally or try to create a new project using the Intellij/Android Studio plugin?

buijs-dev avatar May 14 '24 18:05 buijs-dev

definitely been waiting for your release @buijs-dev

vishwaprojects avatar May 15 '24 05:05 vishwaprojects

i cloned the hello_world i tried to run intiallly it prompted me to add the below thing in gradle lintOptions { │ │ checkReleaseBuilds false │ │ }

so i added this in app level build gradle then i tried to run it i got the below error

You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\vishwateja\Desktop\flutter_vs\klutter-cookbook\hello_world\example\android\app\build.gradle' line: 32

  • What went wrong: Could not compile build file 'C:\Users\vishwateja\Desktop\flutter_vs\klutter-cookbook\hello_world\example\android\app\build.gradle'.

startup failed: build file 'C:\Users\vishwateja\Desktop\flutter_vs\klutter-cookbook\hello_world\example\android\app\build.gradle': 32: Unexpected character: '?' @ line 32, column 161. ? ^

1 error

  • 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

BUILD FAILED in 1s Running Gradle task 'assembleDebug'... 2,665ms Error: Gradle task assembleDebug failed with exit code 1

vishwaprojects avatar May 15 '24 05:05 vishwaprojects

You should not have to do any changes to do the examples to run it.

Can you try this:

  • Clone cookbook again
  • Follow the steps in the readme (to setup local.properties, kradle, etc).
  • Run "./gradlew build -p platform" in the hello_world directory.
  • Start the app.

buijs-dev avatar May 15 '24 05:05 buijs-dev

./gradlew klutterGetKradle

this command is giving the below error

  • What went wrong: A problem occurred evaluating root project 'hello_world'.

Failed to apply plugin 'com.android.internal.library'. Android Gradle plugin requires Java 17 to run. You are currently using Java 11. Your current JDK is located in C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing org.gradle.java.home in gradle.properties.

  • 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.

solutions tried (from stack overflow )

changed my java home var into java 17 changed to java 17 in my build tools

no use same error

vishwaprojects avatar May 15 '24 06:05 vishwaprojects

C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot

@vishwaprojects If you're still seeing the same error it's likely it's still relying on JDK 11. Have you tried removing it?

Xerosigma avatar Jun 08 '24 01:06 Xerosigma