junit framework not found
See original GitHub issueYour Environment
- Plugin version: 3.0.0 alpha 50
- Platform: Android
- Running in Simulator:
- Cordova version (
cordova -v
): 8.1.2 - Cordova platform version (
cordova platform ls
): Android 8.0.0 - Plugin configuration options:
ionic cordova plugin add cordova-plugin-mauron85-background-geolocation@alpha --save
--variable ANDROID_SUPPORT_LIBRARY_VERSION="23+"
--variable GOOGLE_PLAY_SERVICES_VERSION="11.+"
--variable ICON="@mipmap/ic_launcher"
--variable SMALL_ICON="@mipmap/ic_launcher"
--variable ACCOUNT_NAME="@string/app_name"
--variable ACCOUNT_LABEL="@string/app_name"
--variable ACCOUNT_TYPE="$PACKAGE_NAME.account"
--variable CONTENT_AUTHORITY="$PACKAGE_NAME"
--variable ALWAYS_USAGE_DESCRIPTION="description"
--variable MOTION_USAGE_DESCRIPTION="description"
Context
Task :app:compileDebugJavaWithJavac FAILED
25 actionable tasks: 25 executed
BUILD FAILED in 40s
/../platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: /../platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/../platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:26: error: package junit.framework does not exist
import junit.framework.Assert;
^
/../platforms/android/app/src/main/java/com/marianhello/bgloc/service/LocationServiceIntentBuilder.java:164: error: cannot find symbol
Assert.assertNotNull("Context can not be null!", mContext);
^
symbol: variable Assert
Expected Behavior
After calling cordova android build
, the build process should be successful
Actual Behavior
The error pops up when running cordova android build
Steps to Reproduce
- Install plugin with config above
- run
cordova build android
Issue Analytics
- State:
- Created 5 years ago
- Comments:23 (2 by maintainers)
Top Results From Across the Web
maven junit.framework does not exist - Stack Overflow
1. I suppose you imported the Maven project into IntelliJ properly, and do you see your declared junit dependency in External Libraries of ......
Read more >package junit.framework does not exist – TeamCity Support
One thing I've run into - and I'm sure this is a newbie question - is testing. My build step is of type...
Read more >error: package junit.framework does not exist - CodeRanch
when i compile my testcase with Ant as ant -f testbuild.xml compile.test getting this error as package junit.framework does not exist testbuild.xml its...
Read more >the import org.junit cannot be resolved in Eclipse - Todd Lahman
1. Right click on the Java project and select Build Path > Configure Build Path. · 2. Click Add Library. · 3. Select...
Read more >import junit.framework.Assert (Android Studio) 2020 - YouTube
Error project: import junit. framework.Assert (Android Studio) 2020Download Link ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mowaiskalam
Hey guys, for anyone having this issue the fix is quite simple:
jUnit is used for testing purposes, I don’t know why the dependency is there. So what you have to do is open
platforms\android\app\src\main\java\com\marianhello\bgloc\service\LocationServiceIntentBuilder.java
and comment (or remove, it’s the same) the following lines:26 -
import junit.framework.Assert;
164 -Assert.assertNotNull("Context can not be null!", mContext);
After that everything should be working as expected.
If I remember correctly this has been fixed in common module, which was just updated to latest version. Try plugin version 3.0.0.0 (released just now).