I want to create a folder to try downloading files. so I added simple_permission but I got an error migrating to androidX even though I migrated to androidX. how can I resolve this error?
Launching lib\main.dart on Coolpad E502 in debug mode...
D:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:9: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
D:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:10: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
^
D:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:156: error: cannot find symbol
ActivityCompat.requestPermissions(activity, perm, 0);
^
symbol: variable ActivityCompat
location: class SimplePermissionsPlugin
D:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:163: error: cannot find symbol
return PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(activity, permission);
^
symbol: variable ContextCompat
location: class SimplePermissionsPlugin
D:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:171: error: cannot find symbol
if (ActivityCompat.shouldShowRequestPermissionRationale(registrar.activity(), permission)) {
^
symbol: variable ActivityCompat
location: class SimplePermissionsPlugin
D:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\simple_permissions-0.1.9\android\src\main\java\com\ethras\simplepermissions\SimplePermissionsPlugin.java:175: error: cannot find symbol
if (ActivityCompat.checkSelfPermission(registrar.context(), permission) == PackageManager.PERMISSION_GRANTED) {
^
symbol: variable ActivityCompat
location: class SimplePermissionsPlugin
6 errors
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':simple_permissions:compileDebugJavaWithJavac'.
Compilation failed; see the compiler error output for details.
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 45s
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.\
Exited (sigterm)
I had the same error and what I did was change the version of klotin in the build.gradle file I have it as follows
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.2'
}
}
Related
I'm having a problem with Building TF Hub from Source. Can Anyone please help me out? I've been following the steps as given in https://github.com/tensorflow/hub/blob/master/tensorflow_hub/pip_package/PIP.md
I've installed bazel 0.24.1.
Error I'm Getting:
ERROR: /home/tf_hub/hub/WORKSPACE:17:1: name 'git_repository' is not defined
ERROR: /home/tf_hub/hub/WORKSPACE:40:1: name 'http_archive' is not defined
ERROR: /home/tf_hub/hub/WORKSPACE:47:1: name 'new_http_archive' is not defined
ERROR: Error evaluating WORKSPACE file
ERROR: error loading package '': Encountered error while reading extension file 'tools/build_defs/repo/http.bzl': no such package '#bazel_tools//tools/build_defs/repo': error loading package 'external': Could not load //external package
ERROR: error loading package '': Encountered error while reading extension file 'tools/build_defs/repo/http.bzl': no such package '#bazel_tools//tools/build_defs/repo': error loading package 'external': Could not load //external package
INFO: Elapsed time: 2.552s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
Bazel Version: 0.24.1
Python Version: 3
Tensorflow Version: 2.0.0a
Commands to Reproduce:
(env)~/tf_hub$ git clone https://github.com/tensorflow/hub
(env)~/tf_hub$ cd hub && bazel build tensorflow_hub/pip_package:build_pip_package
Expected Output: No Error. Build Sucessful
Latest Versions of Bazel Doesn't support git_repository (which is still used by tensorflow_hub), so Uninstalling Bazel 0.24.1 and installing Bazel 0.18.1 worked.
I am using Bitbucket Pipelines for building a project from our university.
Here is my configuration from bitbucket-pipelines.yml:
image: maven:3.3.9-jdk-8
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- mvn -f EasyDiet_JavaFX_View/pom.xml clean install
And here is some of the compilation error -> relates to JavaFX:
ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[11,19] package javafx.fxml does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[12,28] package javafx.scene.control does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[13,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[14,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[15,20] package javafx.stage does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[27,13] cannot find symbol
symbol: class VBox
location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[29,13] cannot find symbol
symbol: class BorderPane
location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[336,12] cannot find symbol
symbol: class Stage
location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
And here some output of the build failure:
INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.828 s
[INFO] Finished at: 2016-10-19T10:18:57+00:00
[INFO] Final Memory: 19M/282M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project easydiet-view: Compilation failure: Compilation failure:
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[11,19] package javafx.fxml does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[12,28] package javafx.scene.control does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[13,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[14,27] package javafx.scene.layout does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[15,20] package javafx.stage does not exist
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[27,13] cannot find symbol
[ERROR] symbol: class VBox
[ERROR] location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
[ERROR] /opt/atlassian/pipelines/agent/build/EasyDiet_JavaFX_View/src/at/fhv/easyDiet/teamC/presentation/patientFile/PatientFileController.java:[29,13] cannot find symbol
[ERROR] symbol: class BorderPane
[ERROR] location: class at.fhv.easyDiet.teamC.presentation.patientFile.PatientFileController
If i build it locally on my Mac it works fine, but if i try with Bitbucket Pipelines i only get those errors. I have already tried with the default maven:3.3.3 image.
How is it possible to build JavaFX in Bitbucket Pipelines?
This worked for me:
image: maven:3-jdk-8
pipelines:
default:
- step:
script: # Modify the commands below to build your repository.
- apt-get update
- apt-get install -y openjfx
- mvn clean install
I'm trying to use the grails asset-pipeline plugin with the sass extension on Grails 3. Unfortunately, following the documentation to configure them in the build.gradle file isn't useful because this error is generated:
FAILURE: Build failed with an exception.
* Where:
Build file '/MyProject/build.gradle' line: 17
* What went wrong:
Could not compile build file '/MyProject/build.gradle'.
> startup failed:
build file '/MyProject/build.gradle': 17: only id(String) method calls allowed in plugins {} script block
See http://gradle.org/docs/2.3/userguide/plugins.html#sec:plugins_block for information on the plugins {} block
# line 17, column 5.
provided ":sass-asset-pipeline:$assetsPipelineSassVersion"
^
1 error
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.128 secs
| Error Error initializing classpath: startup failed:
build file '/MyProject/build.gradle': 17: only id(String) method calls allowed in plugins {} script block
See http://gradle.org/docs/2.3/userguide/plugins.html#sec:plugins_block for information on the plugins {} block
# line 17, column 5.
provided ":sass-asset-pipeline:$assetsPipelineSassVersion"
^
1 error
(Use --stacktrace to see the full trace)
0
I've found a solution with this gradle configuration (version variables are defined in gradle.properties):
buildscript {
dependencies {
classpath "com.bertramlabs.plugins:asset-pipeline-gradle:$assetsPipelineVersion"
}
}
apply plugin: 'com.bertramlabs.asset-pipeline'
assets {
minifyJs = true
minifyCss = true
from '/img'
from '/js'
from '/css'
from '/fonts'
}
dependencies {
compile "org.grails.plugins:asset-pipeline"
runtime "org.grails.plugins:asset-pipeline"
assets "com.bertramlabs.plugins:sass-asset-pipeline:$assetsPipelineSassVersion"
}
I am using javac in ant to compile a project and I am getting an compilation error message without the file or line number. Why is this and how can i find where in the (large) project the problem is?
build.xml
make_folders:
compile:
[javac] Compiling 33 source files to *project root*/bin/classes
[javac] error: incompatible types: String cannot be converted to Integer
[javac] Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
[javac] 1 error
BUILD FAILED
*project root*/build.xml:33: Compile failed; see the compiler error output for details.
And heres the relevant lines with verbose set to true:
[javac] [loading ZipFileIndexFileObject[/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/lib/ct.sym(META-INF/sym/rt.jar/java/util/Date.class)]]
[javac] error: incompatible types: String cannot be converted to Integer
UPDATE:
So I managed to figure out that the error it was originating from calling a function in a class from within an inner class in said outer class. I'm not sure why this produced an error or why it was presented with such little information so any help would still be appreciated.
Have just added to BuildConfig.groovy:
compile ":cache-ehcache:1.0.1"
I'm using Eclipse/Spring Tool Suite v 3.5.0.RELEASE
JAVA_HOME set to: E:\Program Files\Java\jdk1.7.0_17
I get the following compilation errors when I run grails runApp.
Compilation error: startup failed:
Compile error during compilation with javac.
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:195: error: ReloadableCacheManager.ProxyEhcache is not abstract and does not override abstract method getSearchesPerSecond() in Ehcache
protected class ProxyEhcache implements Ehcache {
^
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:798: error: getStatistics() in ReloadableCacheManager.ProxyEhcache cannot implement getStatistics() in Ehcache
public StatisticsGateway getStatistics()
^
return type StatisticsGateway is not compatible with Statistics
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:656: error: cannot find symbol
return getUnderlyingEhcache(name).getSearchAttributes();
^
symbol: method getSearchAttributes()
location: interface Ehcache
C:\Documents and Settings\pagendg\.grails\2.3.8\projects\osrpms\plugins\cache-ehcache-1.0.1\src\java\grails\plugin\cache\ehcache\GrailsEhCacheManagerFactoryBean.java:653: error: method does not override or implement a method from a supertype
#Override
^
try to delete the project’s folder under the .grails directory, e.g. ‘~/.grails/2.3.8/projects/osrpms’.
and the commands
grails clean-all
grails clean
then run the project