Is it possible to run Google Maps (API V1 is fine) on a none Google API build target? I have a special emulator that does not have the google api built in.
When I try adding the maps.jar to the libs folder in my project so the MapActivity can reference that I am getting the stack trace shown below. I am using the Google Maps API V1 Maps.jar for this.
I have tried setting the manifest to use , and also removed it, both do not work.
Thanks!
04-04 17:23:20.553: E/AndroidRuntime(12458): FATAL EXCEPTION: main
04-04 17:23:20.553: E/AndroidRuntime(12458): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.google.android.maps/com.google.android.maps.MapMainActivity}: java.lang.RuntimeException: stub
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.os.Looper.loop(Looper.java:123)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.main(ActivityThread.java:3683)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.reflect.Method.invokeNative(Native Method)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.reflect.Method.invoke(Method.java:507)
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-04 17:23:20.553: E/AndroidRuntime(12458): at dalvik.system.NativeStart.main(Native Method)
04-04 17:23:20.553: E/AndroidRuntime(12458): Caused by: java.lang.RuntimeException: stub
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.google.android.maps.MapActivity.<init>(Unknown Source)
04-04 17:23:20.553: E/AndroidRuntime(12458): at com.google.android.maps.MapMainActivity. <init>(MapMainActivity.java:10)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.Class.newInstanceImpl(Native Method)
04-04 17:23:20.553: E/AndroidRuntime(12458): at java.lang.Class.newInstance(Class.java:1409)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-04 17:23:20.553: E/AndroidRuntime(12458): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
Nope. The Google API's are required.
You should be using Google Maps Android API v2. API v1 is deprecated and you won't have it working for new applications.
It is even worse with API v2. Not officially supported to run on any emulator.
I think you can use a webView and load your map from a web server.
Related
I am new for this application and i am following tutorials to learn. I followed https://github.com/survivingwithandroid/Surviving-with-android/tree/master/WeatherForecastApp to test weather app but i am getting force close. I also goggled for this error but still i am not able to solve. If anybody faced this error please help.
Logcat error
E/AndroidRuntime(5988): FATAL EXCEPTION: main
E/AndroidRuntime(5988): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.survivingwithandroid.weatherapp/com.survivingwithandroid.weatherapp.MainActivity}: java.lang.ClassNotFoundException: com.survivingwithandroid.weatherapp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.survivingwithandroid.weatherapp-2.apk]
E/AndroidRuntime(5988): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
E/AndroidRuntime(5988): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
E/AndroidRuntime(5988): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(5988): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
E/AndroidRuntime(5988): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(5988): at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(5988): at android.app.ActivityThread.main(ActivityThread.java:3687)
E/AndroidRuntime(5988): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(5988): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(5988): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
E/AndroidRuntime(5988): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
E/AndroidRuntime(5988): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(5988): Caused by: java.lang.ClassNotFoundException: com.survivingwithandroid.weatherapp.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.survivingwithandroid.weatherapp-2.apk]
E/AndroidRuntime(5988): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
E/AndroidRuntime(5988): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
E/AndroidRuntime(5988): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
E/AndroidRuntime(5988): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(5988): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
E/AndroidRuntime(5988): ... 11 more
it seems to me that you didn't download correctly the project from GitHub. If you stil experience this problem let me know and will try to download it from Github to check if there are some problems with the project i shared.
Thank you
I've been adding a map to an Android project of mine and when ever my class loads the XML file with the map fragment it crashes, I was following this tutorial
( https://developers.google.com/maps/documentation/android/start#the_google_maps_api_key )
I'm using a Nexus 7 (Jellybean 4.1) so that shouldn't be a problem, here is my class:
package com.app.thetoolstore;
import android.app.Activity;
import android.os.Bundle;
public class Tool_map extends Activity{
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map_activity);
}
}
And here is my XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#001" >
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
</LinearLayout>
and finally my Stack Trace:
04-04 10:01:35.551: E/AndroidRuntime(14362): FATAL EXCEPTION: main
04-04 10:01:35.551: E/AndroidRuntime(14362): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.thetoolstore/com.app.thetoolstore.Tool_map}: android.view.InflateException: Binary XML file line #29: Error inflating class fragment
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1872)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1893)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.ActivityThread.access$1500(ActivityThread.java:135)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1054)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.os.Looper.loop(Looper.java:150)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.ActivityThread.main(ActivityThread.java:4385)
04-04 10:01:35.551: E/AndroidRuntime(14362): at java.lang.reflect.Method.invokeNative(Native Method)
04-04 10:01:35.551: E/AndroidRuntime(14362): at java.lang.reflect.Method.invoke(Method.java:507)
04-04 10:01:35.551: E/AndroidRuntime(14362): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
04-04 10:01:35.551: E/AndroidRuntime(14362): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)
04-04 10:01:35.551: E/AndroidRuntime(14362): at dalvik.system.NativeStart.main(Native Method)
04-04 10:01:35.551: E/AndroidRuntime(14362): Caused by: android.view.InflateException: Binary XML file line #29: Error inflating class fragment
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-04 10:01:35.551: E/AndroidRuntime(14362): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:250)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.Activity.setContentView(Activity.java:1742)
04-04 10:01:35.551: E/AndroidRuntime(14362): at com.app.thetoolstore.Tool_map.onCreate(Tool_map.java:11)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1072)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1836)
04-04 10:01:35.551: E/AndroidRuntime(14362): ... 11 more
04-04 10:01:35.551: E/AndroidRuntime(14362): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/system/framework/com.google.android.maps.jar:/data/app/com.app.thetoolstore-2.apk]
04-04 10:01:35.551: E/AndroidRuntime(14362): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-04 10:01:35.551: E/AndroidRuntime(14362): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-04 10:01:35.551: E/AndroidRuntime(14362): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.createView(LayoutInflater.java:471)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:549)
04-04 10:01:35.551: E/AndroidRuntime(14362): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
04-04 10:01:35.551: E/AndroidRuntime(14362): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
04-04 10:01:35.551: E/AndroidRuntime(14362): ... 20 more
UPDATE
I solved the issue using this tutorial https://docs.google.com/document/pub?id=19nQzvKP-CVLd7_VrpwnHfl-AE9fjbJySowONZZtNHzw speciffically I had issues with the libs and google-pay services.
Hmmm lots of issue
1) You need to use FragmentActivity instead of Activity
2) android:name="com.google.android.gms.maps.MapFragment" replace by android:name="com.google.android.gms.maps.SupportMapFragment"/>
3) You need to add your key in manifest file and use Google Android Map API v2
4) Refer this tutorial http://www.vogella.com/articles/AndroidGoogleMaps/article.html
Please help to understand strange application behaviour.
In almost all devices in production everything is OK, I'm using ACRA to collect crash reports. But here is what I've got from Alpha GTR device:
ComponentInfo{com.xxxxxxxxxxx /com.xxxxxxxxxxx.xxxxActivity}: java.lang.ClassNotFoundException: com.xxxxxxxxxxx.xxxxActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2108)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.access$600(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:4987)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.xxxxxxxxxxx.xxxxActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2099)
... 11 more
java.lang.ClassNotFoundException: com.xxxxxxxxxxx.xxxxActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2099)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2211)
at android.app.ActivityThread.access$600(ActivityThread.java:149)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1300)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:4987)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
at dalvik.system.NativeStart.main(Native Method)
So application failed to start with strange exception. I've already checked SO questions about it, and just adding libraries as Unable to instantiate activity... Caused by ClassNotFoundException doesn't help here.
Could it be some device-specific exception? My app uses Camera, Google Maps and GPS.
Maybe you have to check if GPS or Camera are supported by the device first?
LocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER);
Im getting "unclosed cursor detected" when starting a MapActivity even in the most basic form:
protected void onCreate(Bundle icicle) {
super.onCreate(icicle); // <--- The Exception occurs here
setContentView(R.layout.layout_map);
}
After the exception, the map starts and it works perfectly, but that exception every time it starts the activity really bothers me.
The Exception:
04-04 12:02:22.858: W/Cursor(14122): Unclosed Cursor detected
04-04 12:02:22.866: W/Cursor(14122): at android.content.ContentResolver.query(ContentResolver.java:258)
04-04 12:02:22.866: W/Cursor(14122): at com.google.common.android.AndroidConfig.getSetting(Unknown Source)
04-04 12:02:22.866: W/Cursor(14122): at com.google.common.android.AndroidConfig.getDistributionChannelInternal(Unknown Source)
04-04 12:02:22.866: W/Cursor(14122): at com.google.common.Config.init(Unknown Source)
04-04 12:02:22.866: W/Cursor(14122): at com.google.common.android.AndroidConfig.(Unknown Source)
04-04 12:02:22.866: W/Cursor(14122): at com.google.common.android.AndroidConfig.(Unknown Source)
04-04 12:02:22.866: W/Cursor(14122): at com.google.android.maps.MapActivity.onCreate(MapActivity.java:405)
04-04 12:02:22.866: W/Cursor(14122): at com.myapp.activity.MyMapActivity.onCreate(MyMapActivity.java:25)
04-04 12:02:22.874: W/Cursor(14122): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-04 12:02:22.874: W/Cursor(14122): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2717)
04-04 12:02:22.874: W/Cursor(14122): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2769)
04-04 12:02:22.874: W/Cursor(14122): at android.app.ActivityThread.access$2500(ActivityThread.java:129)
04-04 12:02:22.874: W/Cursor(14122): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2117)
04-04 12:02:22.874: W/Cursor(14122): at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 12:02:22.874: W/Cursor(14122): at android.os.Looper.loop(Looper.java:143)
04-04 12:02:22.874: W/Cursor(14122): at android.app.ActivityThread.main(ActivityThread.java:4717)
04-04 12:02:22.874: W/Cursor(14122): at java.lang.reflect.Method.invokeNative(Native Method)
04-04 12:02:22.882: W/Cursor(14122): at java.lang.reflect.Method.invoke(Method.java:521)
04-04 12:02:22.882: W/Cursor(14122): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
04-04 12:02:22.882: W/Cursor(14122): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
04-04 12:02:22.882: W/Cursor(14122): at dalvik.system.NativeStart.main(Native Method)
I searched the web but found nothing...
Extra info:
Im using Google API 2.2
Tested it on the device and on the AVD
Have other Map projects working with Google API 2.1 (Without that exception of course)
My AndroidManifest is not missing anything (hence the map starts and works after the exception is thrown)
Help is appreciated!
Edit:
I updated both Google API level 7 and 8 (the problem started on 8) now it happens on API level 7 too...
Hydrangea helped me notice that the Bundle variables name in my MapActivity (icicle) differs from the "standard" (savedInstanceState) maybe that has something to do with the problem?
You need to close the cursor after you have the information from the database.
Example:
cursor.close();
Are you sure the problem doesn't exist from another class? Your code looks okay to me.
I ran this on a 2.2 device, and didn't get any such error. Is something else happening in your Activity that might be causing it? Perhaps something in the bundle causing super.onCreate() to have issues?
public class HelloGoogleMapsActivity extends MapActivity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
#Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
I am currently testing the roottools jar/library made by stericson in an app, but every time the app loads it force closes.
Here is the code:
package com.liamwli.root;
import android.app.Activity;
import android.os.Bundle;
import android.widget.Toast;
import com.stericson.RootTools.*;
public class root_test extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (RootTools.isBusyboxAvailable()) {
setContentView(R.layout.main);
} else {
RootTools.offerBusyBox(this);
}
if (RootTools.isRootAvailable()) {
Toast liam = Toast.makeText(this, "Root Available",
Toast.LENGTH_SHORT);
liam.show();
} else {
// do something else
}
}
}
And here is the logcat:
04-04 21:44:47.009: I/Process(6622): Sending signal. PID: 6622 SIG: 9
04-04 21:45:40.859: I/dalvikvm(6722): Could not find method com.stericson.RootTools.RootTools.isBusyboxAvailable, referenced from method com.liamwli.root.root_test.onCreate
04-04 21:45:40.859: W/dalvikvm(6722): VFY: unable to resolve static method 16: Lcom/stericson/RootTools/RootTools;.isBusyboxAvailable ()Z
04-04 21:45:40.859: D/dalvikvm(6722): VFY: replacing opcode 0x71 at 0x0003
04-04 21:45:40.859: D/AndroidRuntime(6722): Shutting down VM
04-04 21:45:40.859: W/dalvikvm(6722): threadid=1: thread exiting with uncaught exception (group=0x40ac21f8)
04-04 21:45:40.869: E/AndroidRuntime(6722): FATAL EXCEPTION: main
04-04 21:45:40.869: E/AndroidRuntime(6722): java.lang.NoClassDefFoundError: com.stericson.RootTools.RootTools
04-04 21:45:40.869: E/AndroidRuntime(6722): at com.liamwli.root.root_test.onCreate(root_test.java:16)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.app.Activity.performCreate(Activity.java:4465)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.app.ActivityThread.access$600(ActivityThread.java:123)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.os.Handler.dispatchMessage(Handler.java:99)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.os.Looper.loop(Looper.java:137)
04-04 21:45:40.869: E/AndroidRuntime(6722): at android.app.ActivityThread.main(ActivityThread.java:4424)
04-04 21:45:40.869: E/AndroidRuntime(6722): at java.lang.reflect.Method.invokeNative(Native Method)
04-04 21:45:40.869: E/AndroidRuntime(6722): at java.lang.reflect.Method.invoke(Method.java:511)
04-04 21:45:40.869: E/AndroidRuntime(6722): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
04-04 21:45:40.869: E/AndroidRuntime(6722): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:554)
04-04 21:45:40.869: E/AndroidRuntime(6722): at dalvik.system.NativeStart.main(Native Method)
I am quite new to android, and I am now very confused :(
If someone could possibly help me, I would be grateful!
In Eclipse, right click your project, navigate to "Build Path", then to "configure build path"
Now choose "add External Jar"
Navigate to the RootTools .jar file you download and choose it.
Navigate to "Order and Export" make sure the box is ticked next to the library, and move it to the top of the list.
Finish up by choosing "ok"
I resolved this by separating the imports. Instead of:
import com.stericson.RootTools.*;
I only used/needed:
import com.stericson.RootTools.RootTools;
Try adding the others individually if you need them.
import com.stericson.RootTools.Mount;
import com.stericson.RootTools.Permissions;
import com.stericson.RootTools.RootToolsException;
import com.stericson.RootTools.Symlink;
import com.stericson.RootTools.SanityCheckRootTools;
It worked for me, hope it does for you!