Unexpected native type exception in android
09-19 08:55:39.816 9079-10772/com.facebook.react.uiapp E/unknown:React﹕ Exception in native call from JS
com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type string', but had typeint64'
at com.facebook.react.bridge.ReadableNativeMap.getString(Native Method)
at com.facebook.react.uimanager.CatalystStylesDiffMap.getString(CatalystStylesDiffMap.java:72)
at com.facebook.react.views.text.ReactTextShadowNode.updateProperties(ReactTextShadowNode.java:320)
at com.facebook.react.views.textinput.ReactTextInputShadowNode.updateProperties(ReactTextInputShadowNode.java:102)
at com.facebook.react.uimanager.UIManagerModule.createView(UIManagerModule.java:256)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.facebook.react.bridge.BaseJavaModule$JavaMethod.invoke(BaseJavaModule.java:106)
at com.facebook.react.bridge.NativeModuleRegistry$ModuleDefinition.call(NativeModuleRegistry.java:126)
at com.facebook.react.bridge.NativeModuleRegistry.call(NativeModuleRegistry.java:64)
at com.facebook.react.bridge.CatalystInstance$NativeModulesReactCallback.call(CatalystInstance.java:326)
at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31)
at android.os.Looper.loop(Looper.java:135)
at com.facebook.react.bridge.queue.MessageQueueThread$1.run(MessageQueueThread.java:137)
at java.lang.Thread.run(Thread.java:818)
@zakelfassi Sorry, always get the same
Y:\hope>react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat install
Debug)...
FAILURE: Build failed with an exception.
* Where:
Build file 'Y:\hope\android\app\build.gradle' line: 29
* What went wrong:
A problem occurred evaluating project ':app'.
> Project with path ':ReactAndroid' could not be found in project ':app'.
* 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.487 secs
Could not install the app on the device, see the error above.
Y:\hope>
Is the Y:\hope\android\app\build.gradle the file to be modified as mentioned earlier?
Is it enough to copy the ReactAndroid folder into Y:\hope\android\app ?
Its started working for me. Thank you very much.
Neeraj Singh
On Fri, Sep 25, 2015 at 3:49 AM, Bernd Wessels [email protected] wrote:
@zakelfassi https://github.com/zakelfassi Sorry, always get the same
Y:\hope>react-native run-android Starting JS server... Building and installing the app on the device (cd android && gradlew.bat install Debug)...
FAILURE: Build failed with an exception.
Where: Build file 'Y:\hope\android\app\build.gradle' line: 29
What went wrong: A problem occurred evaluating project ':app'.
Project with path ':ReactAndroid' could not be found in project ':app'.
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.487 secs Could not install the app on the device, see the error above.
Y:\hope>
Is the Y:\hope\android\app\build.gradle the file to be modified as mentioned earlier?
Is it enough to copy the ReactAndroid folder into Y:\hope\android\app ?
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/2855#issuecomment-143064733 .
@neeraj-singh What did you do to make it run?
Followed the same thing
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.1' // compile 'com.facebook.react:react-native:0.11.+' compile project(':ReactAndroid') }
with new pull from master.
Just this every time I need to kill other process which was listening to port 8081. and after running ./packager/packager.sh only it was working.
Neeraj Singh
On Fri, Sep 25, 2015 at 3:52 AM, Bernd Wessels [email protected] wrote:
@neeraj-singh https://github.com/neeraj-singh What did you do to make it run?
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/2855#issuecomment-143065234 .
@neeraj-singh Mmh, wonder why I get these errors mentioned above.
When I add this to Y:\hope\android\settings.gradle
include ':ReactAndroid'
And then run react-native run-android I get
Y:\hope>react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat install
Debug)...
FAILURE: Build failed with an exception.
* Where:
Build file 'Y:\hope\android\ReactAndroid\build.gradle' line: 8
* What went wrong:
Could not compile build file 'Y:\hope\android\ReactAndroid\build.gradle'.
> startup failed:
build file 'Y:\hope\android\ReactAndroid\build.gradle': 8: unable to resolve c
lass de.undercouch.gradle.tasks.download.Download
@ line 8, column 1.
import de.undercouch.gradle.tasks.download.Download
^
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: 4.367 secs
Could not install the app on the device, see the error above.
Y:\hope>
Any ideas?
try this clean your project. add the suggested line in your build.gradle file of example app you want to run. to build either use android-studio or use this command
./gradlew :Examples:Movies:android:app:installDebug
kill any process which is listening port 8081
run
./packager/packager.sh
if running on device run this also
adb reverse tcp:8081 tcp:8081
reload js it should work.
Neeraj Singh
On Fri, Sep 25, 2015 at 4:25 AM, Bernd Wessels [email protected] wrote:
@neeraj-singh https://github.com/neeraj-singh Mmh, wonder why I get these errors mentioned above.
When I add this to Y:\hope\android\settings.gradle
include ':ReactAndroid'
And then run react-native run-android I get
Y:\hope>react-native run-android Starting JS server... Building and installing the app on the device (cd android && gradlew.bat install Debug)...
FAILURE: Build failed with an exception.
Where: Build file 'Y:\hope\android\ReactAndroid\build.gradle' line: 8
What went wrong: Could not compile build file 'Y:\hope\android\ReactAndroid\build.gradle'.
startup failed: build file 'Y:\hope\android\ReactAndroid\build.gradle': 8: unable to resolve c lass de.undercouch.gradle.tasks.download.Download @ line 8, column 1. import de.undercouch.gradle.tasks.download.Download ^
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: 4.367 secs Could not install the app on the device, see the error above.
Y:\hope>
Any ideas?
— Reply to this email directly or view it on GitHub https://github.com/facebook/react-native/issues/2855#issuecomment-143070640 .
@malchev works for me as well, thanks
@BerndWessels Modify Y:\hope\android\build.gradle to the following:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.1'
classpath 'de.undercouch:gradle-download-task:1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenLocal()
}
}
@yzarubin Thank you, will give it a try.
i found it also , now update gradle for latest is ok: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.facebook.react:react-native:0.12.+' }
https://github.com/facebook/react-native/
npm start
The system cannot find the specified path.
why? I have installed studio Android to the simulator, but the service is not open. system : windows