Closed luandro closed 5 years ago
Are you sure you linked the library before running?
I have the same error
Same error, maybe you should join the classes in the same parent package
I'm running to the same error. Anybody got a solution?!
I've made a functional fork here https://github.com/AsharaStudios/react-native-wifi-hotspot but it's not available on npm, anyway you can install it using:
npm i asharastudios/react-native-wifi-hotspot
@jupmorenor I tested your fork but doesn't work either. here is the full log:
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:5: error: package com.android.dx does not exist
import com.android.dx.Code;
^
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:6: error: package com.android.dx does not exist
import com.android.dx.DexMaker;
^
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:7: error: package com.android.dx does not exist
import com.android.dx.FieldId;
^
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:8: error: package com.android.dx does not exist
import com.android.dx.Local;
^
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:9: error: package com.android.dx does not exist
import com.android.dx.MethodId;
^
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:10: error: package com.android.dx does not exist
import com.android.dx.TypeId;
^
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:26: error: cannot find symbol
DexMaker dexMaker;
^
symbol: class DexMaker
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:78: error: cannot find symbol
public void generateConstructorWorking(TypeId<?> declaringType, TypeId<?> superType){
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:78: error: cannot find symbol
public void generateConstructorWorking(TypeId<?> declaringType, TypeId<?> superType){
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:95: error: cannot find symbol
public void generateConstructor(TypeId<?> declaringType, TypeId<?> superType, FieldId<?,?> appCallbackFieldId){
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:95: error: cannot find symbol
public void generateConstructor(TypeId<?> declaringType, TypeId<?> superType, FieldId<?,?> appCallbackFieldId){
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:95: error: cannot find symbol
public void generateConstructor(TypeId<?> declaringType, TypeId<?> superType, FieldId<?,?> appCallbackFieldId){
^
symbol: class FieldId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:110: error: cannot find symbol
public void generateCallbackMethod(TypeId<?> declaringType, FieldId<?,?> appCallbackFieldId, String method){
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:110: error: cannot find symbol
public void generateCallbackMethod(TypeId<?> declaringType, FieldId<?,?> appCallbackFieldId, String method){
^
symbol: class FieldId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:40: error: cannot find symbol
TypeId<?> systemCallbackTypeId = TypeId.get(callbackClass);
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:40: error: cannot find symbol
TypeId<?> systemCallbackTypeId = TypeId.get(callbackClass);
^
symbol: variable TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:42: error: cannot find symbol
dexMaker = new DexMaker();
^
symbol: class DexMaker
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:45: error: cannot find symbol
TypeId<?> tetheringCallback = TypeId.get("LTetheringCallback;");
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:45: error: cannot find symbol
TypeId<?> tetheringCallback = TypeId.get("LTetheringCallback;");
^
symbol: variable TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:50: error: cannot find symbol
TypeId<OreoOnStartTetheringCallback> t = TypeId.get(OreoOnStartTetheringCallback.class);
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:50: error: cannot find symbol
TypeId<OreoOnStartTetheringCallback> t = TypeId.get(OreoOnStartTetheringCallback.class);
^
symbol: variable TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:51: error: cannot find symbol
FieldId<?,?> myCallbackFieldId = tetheringCallback.getField(t, "callback");
^
symbol: class FieldId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:79: error: cannot find symbol
final MethodId<?, ?> superConstructor = superType.getConstructor();
^
symbol: class MethodId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:81: error: cannot find symbol
MethodId<?, ?> constructor = declaringType.getConstructor(TypeId.INT);
^
symbol: class MethodId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:81: error: cannot find symbol
MethodId<?, ?> constructor = declaringType.getConstructor(TypeId.INT);
^
symbol: variable TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:82: error: cannot find symbol
Code constructorCode = dexMaker.declare(constructor, Modifier.PUBLIC);
^
symbol: class Code
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:83: error: cannot find symbol
final Local thisRef = constructorCode.getThis(declaringType);
^
symbol: class Local
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:96: error: cannot find symbol
final MethodId<?, ?> superConstructor = superType.getConstructor();
^
symbol: class MethodId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:97: error: cannot find symbol
TypeId<?> myCallbackTypeId = TypeId.get(OreoOnStartTetheringCallback.class);
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:97: error: cannot find symbol
TypeId<?> myCallbackTypeId = TypeId.get(OreoOnStartTetheringCallback.class);
^
symbol: variable TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:99: error: cannot find symbol
MethodId<?, ?> constructor = declaringType.getConstructor(myCallbackTypeId);
^
symbol: class MethodId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:100: error: cannot find symbol
Code constructorCode = dexMaker.declare(constructor, Modifier.PUBLIC);
^
symbol: class Code
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:101: error: cannot find symbol
final Local thisRef = constructorCode.getThis(declaringType);
^
symbol: class Local
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:112: error: cannot find symbol
MethodId onTetheringStarted = declaringType.getMethod(TypeId.VOID, method);
^
symbol: class MethodId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:112: error: cannot find symbol
MethodId onTetheringStarted = declaringType.getMethod(TypeId.VOID, method);
^
symbol: variable TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:116: error: cannot find symbol
Code code = dexMaker.declare(onTetheringStarted, Modifier.PUBLIC);
^
symbol: class Code
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:118: error: cannot find symbol
final Local thisRef = code.getThis(declaringType);
^
symbol: class Local
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:121: error: cannot find symbol
TypeId declaringTypeCallback = appCallbackFieldId.getDeclaringType();
^
symbol: class TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:122: error: cannot find symbol
Local appCallback = code.newLocal(declaringTypeCallback);
^
symbol: class Local
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:128: error: cannot find symbol
MethodId methodIdInAppCallback = declaringTypeCallback.getMethod(TypeId.VOID, method, TypeId.VOID);
^
symbol: class MethodId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:128: error: cannot find symbol
MethodId methodIdInAppCallback = declaringTypeCallback.getMethod(TypeId.VOID, method, TypeId.VOID);
^
symbol: variable TypeId
location: class CallbackMaker
C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\oreo\CallbackMaker.java:128: error: cannot find symbol
MethodId methodIdInAppCallback = declaringTypeCallback.getMethod(TypeId.VOID, method, TypeId.VOID);
^
symbol: variable TypeId
location: class CallbackMaker
Note: C:\Users\My PC\Desktop\Projects\testingHS\node_modules\react-native-wifi-hotspot\android\app\src\main\java\reactnative\hotspot\HotspotManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
42 errors
@MahdiGhajary fixed on my repo Any issue please contact me.
@jupmorenor I'm running into the initial error:
C:\Users\My PC\Desktop\Projects\testinghs2\android\app\build\generated\rncli\src\main\java\com\facebook\react\PackageList.java:51: error: cannot find symbol
new HotspotModule()
^
symbol: class HotspotModule
location: class PackageList
1 error
FAILURE: Build failed with an exception.
I'm using the latest version of RN (0.60.4), which version are you using?
The react-native link
sentence is not working properly, I don't know how to repair it, but if you look at MainApplication.java
you can fix it manually changing the name of the class inside the getPackages()
protected method. It should be new HotspotPackage()
instead of new HotspotModule()
.
@jupmorenor It finally WORKED! Thank you buddy!
Guys check you linked the library well I think you missed something with linking it.
I will close the repo as it already worked
I am facing same issue.
I've been trying to run the example app. First I ran into some issues on how the libs are imported in Android. After fixing those, I'm now running into this issue: