I just find
java -jar Build\Tools\compiler.jar ^
--compilation_level=ADVANCED_OPTIMIZATIONS ^
--externs Build\jQuery.externs.js ^
--js Build\Output\Compiling.js ^
--js Script/Themes.lang.js ^
--js Script/Themes.js ^
--module Core:3 ^
--js UI/ThemeChooser/ThemeChooser_en.htm.js ^
--js UI/ThemeChooser/ThemeChooser.js ^
--module UI_ThemeChooser:2:Core ^
--js UI/VerticalTabs/VerticalTabs_en.htm.js ^
--js UI/VerticalTabs/VerticalTabs.js ^
--module UI_VerticalTabs:2:Core ^
--js Pager/Pager_en.htm.js ^
--js Pager/jquery.Pager.js ^
--js Pager/Pager.js ^
--module Pager:3:VerticalTabs ^
--module_output_path_prefix .\Compiled\
but I want to know how to set the --closure_entry_point and how to load moduled js by demand
For your first question:
--closure_entry_point is used with --manage_closure_dependencies and --only_closure_dependencies to automatically trim files from the set pass to the compiler. If you aren't using these options they have no value.
For you second question:
You can load your module the same way you would load any other javascript. The simplest method is simply to append a script tag to the DOM when you want to load the module. Another method is to use an XHR to load the js and then call eval() with the results.
Related
I have a project with Vue.js on GitHub which is built by my colleague and I want to see it in the local. After I clone in VScode and I want to use NPM install to first install NPM, but I failed and I don't understand what is the problem. the error message is:
../ext/call.cc:104:53: error: no matching member function for call to 'Get'
Local<String> current_key(Nan::To<String>(keys->Get(i)).ToLocalChecked());
~~~~~~^~~
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
../ext/call.cc:681:27: error: no matching member function for call to 'Get'
if (!op->ParseOp(obj->Get(type), &ops[i])) {
~~~~~^~~
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3594:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
^
/Users/alexchen/Library/Caches/node-gyp/13.10.1/include/node/v8.h:3597:43: note: candidate
function not viable: requires 2 arguments, but 1 was provided
V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
Here is my version of Node and NPM
node -v
v13.10.1
npm -v
6.13.7
Is it a compatibility issue?
I've compiled a K definition using kompile foo.k.
However, when I run krun --directory foo-kompiled/ my-program.foo I see the following error:
[Error] Critical: Could not find a compiled definition. Use --directory to specify one.
How do I correctly use this option?
For historical reasons, kompile --directory . foo.k creates a directory foo-kompiled underneath . rather than using . as the output directory itself. Similarly, krun and other tools that use a compiled k definition look for a directory matching the glob *-kompiled within the directory passed by --directory. Thus, if you run kompile foo.k the correct invocation for krun (since the default value of --directory is the current working directory) is krun my-program.foo --directory ., or simply krun my-program.foo
On a fresh clone of Discourse Mobile from their GitHub repository I come across this error when running "react-native run-android". This application seems to work fine on IOS, but has this issue on Android.
I have already tried messing with different versions and clearing NPM cache and reinstalling all dependencies.
Here is the entire stack trace
info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Configure project :#react-native-community_async-storage
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
> Configure project :app
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Configure project :react-native-device-info
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-fabric
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-firebase
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
react-native-firebase: using React Native prebuilt binary from C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native\android
> Configure project :react-native-key-pair
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-orientation
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-vector-icons
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
> Configure project :react-native-webview
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
:react-native-webview:reactNativeAndroidRoot C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native\android
> Task :react-native-firebase:compileDebugJavaWithJavac FAILED
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\analytics\RNFirebaseAnalyticsPackage.java:3: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:7: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:8: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:5: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:15: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:16: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:407: error: package NotificationCompat does not exist
private NotificationCompat.Action createAction(
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:494: error: cannot find symbol
private RemoteInput createRemoteInput(Bundle remoteInput) {
^
symbol: class RemoteInput
location: class DisplayNotificationTask
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseBackgroundNotificationActionReceiver.java:8: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:20: error: package android.support.annotation does not exist
import android.support.annotation.RequiresApi;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:21: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:10: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:11: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\ReactNativeFirebaseAppRegistrar.java:20: error: package android.support.annotation does not exist
import android.support.annotation.Keep;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\ReactNativeFirebaseAppRegistrar.java:29: error: cannot find symbol
#Keep
^
symbol: class Keep
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\storage\RNFirebaseStoragePackage.java:3: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\analytics\RNFirebaseAnalyticsPackage.java:17: error: cannot find symbol
#RequiresPermission(
^
symbol: class RequiresPermission
location: class RNFirebaseAnalyticsPackage
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:370: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:384: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:398: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:414: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:457: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\storage\RNFirebaseStoragePackage.java:17: error: cannot find symbol
#RequiresPermission(
^
symbol: class RequiresPermission
location: class RNFirebaseStoragePackage
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:36: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: class LocalBroadcastManager
location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:36: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:90: error: cannot find symbol
Boolean enabled = NotificationManagerCompat
^
symbol: variable NotificationManagerCompat
location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:26: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:41: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:51: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:81: error: package NotificationCompat does not exist
NotificationCompat.Builder nb;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:84: error: package NotificationCompat does not exist
nb = new NotificationCompat.Builder(context, channelId);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:87: error: package NotificationCompat does not exist
nb = new NotificationCompat.Builder(context);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:130: error: package NotificationCompat does not exist
NotificationCompat.BigPictureStyle bp = new NotificationCompat.BigPictureStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:130: error: package NotificationCompat does not exist
NotificationCompat.BigPictureStyle bp = new NotificationCompat.BigPictureStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:158: error: package NotificationCompat does not exist
NotificationCompat.BigTextStyle bt = new NotificationCompat.BigTextStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:158: error: package NotificationCompat does not exist
NotificationCompat.BigTextStyle bt = new NotificationCompat.BigTextStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:361: error: package NotificationCompat does not exist
NotificationCompat.Action action = createAction(context, a, intentClass, notification);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:424: error: package NotificationCompat.Action does not exist
NotificationCompat.Action.Builder ab = new NotificationCompat.Action.Builder(
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:424: error: package NotificationCompat.Action does not exist
NotificationCompat.Action.Builder ab = new NotificationCompat.Action.Builder(
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:437: error: cannot find symbol
RemoteInput remoteInput = createRemoteInput(ri);
^
symbol: class RemoteInput
location: class DisplayNotificationTask
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:496: error: package RemoteInput does not exist
RemoteInput.Builder rb = new RemoteInput.Builder(resultKey);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:496: error: package RemoteInput does not exist
RemoteInput.Builder rb = new RemoteInput.Builder(resultKey);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseBackgroundNotificationActionReceiver.java:62: error: cannot find symbol
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
^
symbol: variable RemoteInput
location: class RNFirebaseBackgroundNotificationActionReceiver
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:204: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:54: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: class LocalBroadcastManager
location: class RNFirebaseNotifications
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:54: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseNotifications
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:308: error: cannot find symbol
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
^
symbol: variable RemoteInput
location: class RNFirebaseNotifications
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
47 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-firebase: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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
72 actionable tasks: 1 executed, 71 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
In https://stackoverflow.com/a/2867082/288568 I found two ways of disabling notices. So what exactly is the a difference between
error_reporting(E_ALL ^ E_NOTICE);
and
error_reporting(E_ALL & ~E_NOTICE);
?
And what does the following line do?
error_reporting((E_ALL | E_STRICT) ^ E_DEPRECATED ^ E_NOTICE );
Would this correctly report E_ALL and E_STRICT but not DEPRECATED AND NOTICEs ?
var_dump(error_reporting(E_ALL ^ E_NOTICE));
var_dump(error_reporting(E_ALL & ~E_NOTICE));
is the same int(32759). Just different binary operations to get there.
Would this correctly report E_ALL and E_STRICT but not DEPRECATED AND NOTICEs ?
var_dump( decbin ((E_ALL | E_STRICT) ^ E_DEPRECATED ^ E_NOTICE) );
is
101111111110111
111111111111111 E_ALL
000100000000000 E_STRICT
000000000001000 E_NOTICE
010000000000000 E_DEPRECATED
So the anwser is yes and (E_ALL ^ E_DEPRECATED ^ E_NOTICE) would be the same.
I have a Pylons 1.0 app with a bunch of tests in the test/functional directory.
I'm getting weird test results and I want to just run a single test.
The nose documentation says I should be able to pass in a test name at the command line but I get ImportErrors no matter what I do
For example:
nosetests -x -s sometestname
Gives:
Traceback (most recent call last):
File "/home/ben/.virtualenvs/tsq/lib/python2.6/site-packages/nose-0.11.4-py2.6.egg/nose/loader.py", line 371, in loadTestsFromName
module = resolve_name(addr.module)
File "/home/ben/.virtualenvs/tsq/lib/python2.6/site-packages/nose-0.11.4-py2.6.egg/nose/util.py", line 334, in resolve_name
module = __import__('.'.join(parts_copy))
ImportError: No module named sometestname
I get the same error for
nosetests -x -s appname.tests.functional.testcontroller
What is the correct syntax?
nosetests appname.tests.functional.test_controller should work, where the file is named test_controller.py.
To run a specific test class and method use a path of the form module.path:ClassNameInFile.method_name, that is, with a colon separating the module/file path and the objects within the file. module.path is the relative path to the file (e.g. tests/my_tests.py:ClassNameInFile.method_name).
For me using Nosetests 1.3.0 these variants are working (but make sure you have __init__.py in your tests folder):
nosetests [options] tests.ui_tests
nosetests [options] tests/ui_tests.py
nosetests [options] tests.ui_tests:TestUI.test_admin_page
Note that single colon between module name and class name.
I have to add the ".py" file extension, that is,
r'/path_to/my_file.py:' + r'test_func_xy'
Maybe this is because I don't have any classes in the file.
Without the .py, nose was complaining:
Can't find callable test_func_xy in file /path_to/my_file: file is not
a python module
And this although I have an __init__.py in the folder /path_to/.
I wrote this small script, based on the previous answers:
#!/usr/bin/env bash
#
# Usage:
#
# ./noseTest <filename> <method_name>
#
# e.g.:
#
# ./noseTest test/MainTest.py mergeAll
#
# It is assumed that the file and the test class have the _same name_
# (e.g. the test class `MainTest` is defined in the file `MainTest.py`).
# If you don't follow this convention, this script won't work for you.
#
testFile="$1"
testMethod="$2"
testClass="$(basename "$testFile" .py)"
nosetests "$testFile:$testClass.test_$testMethod"
The following worked for me just well:
nosetests test_file.py:method_name
Note that my tests where not in a class. Test methods were in a single file.
For nosetests 1.3.7, you need to do:
nosetests --tests=tests.test_something.py,tests.test_something_else.py.