由于未知原因 Android Studio Fail to build my Project 。第一次给我看
Error:Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
Could not load module metadata from C:\Users\nirzo\.gradle\caches\modules-2\metadata-2.36\descriptors\com.michaelpardo\activeandroid\3.1.0-SNAPSHOT\c5bb972da5c05fbf59bb87e44d69a746\descriptor.bin
Unexpected metadata type found.
Run Code Online (Sandbox Code Playgroud)
当我第二次清理项目时,它再次显示以下错误。我也尝试无效缓存
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.michaelpardo:activeandroid:3.1.0-SNAPSHOT.
Required by:
project :app
> Could not resolve com.michaelpardo:activeandroid:3.1.0-SNAPSHOT.
> Could not load module metadata from C:\Users\nirzo\.gradle\caches\modules-2\metadata-2.36\descriptors\com.michaelpardo\activeandroid\3.1.0-SNAPSHOT\c5bb972da5c05fbf59bb87e44d69a746\descriptor.bin
Run Code Online (Sandbox Code Playgroud)
但是该项目在我的另一台 PC 上完美运行
我真的不明白这个问题及其原因。
我是 React-native 的新手。我正在尝试为组件中的视图元素设置样式,并且在尝试应用样式标签时,出现以下错误:
注意:
我的样式标签在单独的 js 文件中
在styles.js 中
import {Dimensions} from 'react-native';
const DEVICE_WIDTH= Dimensions.get('window').width;
const DEVICE_HEIGHT= Dimensions.get('window').height;
export default {
container:{
backgroundColor: 'white',
flex:1 ,
width: DEVICE_WIDTH,
height: DEVICE_HEIGHT,
}
};
Run Code Online (Sandbox Code Playgroud)
在 Main.js 文件中
import React,{ Component } from 'react';
import { Router,Scene,Actions} from "react-native-router-flux";
import {View} from 'react-native';
import styles from './styles.js'
class Main extends Component{
render(){
return(
<View style={styles.container} >
<Text>
Hello pages
</Text>
</View>
);
}
}
export default Main;
Run Code Online (Sandbox Code Playgroud)