最近我安装了最新版本的Android Studio(Android Studio 2.1),保留了之前安装的旧1.2版本.现在我有Android Studio 2.1和Android Studio 1.2.在Android Studio 1.2中,当我单击SDK Manager时,它可以正常工作,但在Andorid Studio 2.1中出现此问题:
如何修复Android工作室的两个版本?谢谢
我有一个非常奇怪的问题。在 Angular(使用 ionic v1 构建的应用程序)中,我调用了一些在 java 中构建的 REST 调用,但是出现了问题,chrome 向我建议以下错误:

有趣的代码是这样的,Angular js 中的 REST 服务:
bankaccountsbyuser: function(_getbauser, _error){
var currentToken = _GetToken();
if(currentToken!=null){
var Headers = {
token: currentToken.tokenUser,
};
}
_timerTokenControl(currentToken, _error);
if (setupTime == null) {
console.log("token scaduto");
//modificare
//$window.location.href="login.html";
}
if (currentToken !== null) {
$http({
method : 'GET',
headers: Headers,
url : REST_URL+'bankaccount'
}).then(function successCallback(response) {
console.log(response)
_getbauser(response)
}, function errorCallback(response) {
console.log(response.statusText);
});
} else {
var alertPopup = $ionicPopup.alert({
title: 'Accesso negato!',
template: 'Devi …Run Code Online (Sandbox Code Playgroud)我执行一个顺序调用两个函数的函数,运行第二个函数应该先完成第一个函数.但这不会发生,也许是因为第一个函数是异步的.我读到我需要使用"承诺"我以不同的方式尝试了它,但它不起作用.所以我重写了我最初写的函数:
function fail() {
// Get the snackbar DIV
var x = document.getElementById("snackbar")
// Add the "show" class to DIV
x.className = "show";
// After 3 seconds, remove the show class from DIV
setTimeout(function(){ x.className = x.className.replace("show", "");}, 3000);
}
function _goback(){
$location.url('/app/dispensers');
}
//Check if the item is still available (if nobody bought it)
function _checkavailability(response){
if (response.data == ""){
console.log("Accesso non autorizzato")
}
$scope.infoproductbyid = response.data;
if($scope.infoproductbyid.purchaseTime == null){
console.log("Item disponibile");
//if the item …Run Code Online (Sandbox Code Playgroud) 从js页面(角度)我调用REST请求,GET方法,我是否要传递一个标头,这是我从REST请求调用的函数:
allstaffworking: function(_getstaff){
var currentToken = _GetToken();
var Headers = {
token: currentToken.stringtoken
};
console.log("idtoken"+Headers);
if (currentToken !== null) {
$http({
method : 'GET',
headers: Headers,
url : REST_URL+'staff/working'
}).then(function successCallback(response) {
_getstaff(response)
}, function errorCallback(response) {
console.log(response.statusText);
});
} else {
console.log("NON SEI LOGGATO!!!");
}
},
Run Code Online (Sandbox Code Playgroud)
没有headers: Headers,它的工作原理,但我想传递一个重要的json字符串:{"idtokenStaff":11,"staffType":{"idstaffType":2,"type":"Dipendente"},"tokenStaff":"88d08m8ve4n8i71k796vajkd01"}在Headers中.我不知道如何在泽西岛拿这个字符串.这是java文件,我有REST方法:
@Path("/staff")
public class StaffController {
BaseDao sDao = new StaffDaoImpl();
StaffDao stfDao = new StaffDaoImpl();
TokenStaffDao tsDao = new TokenStaffDaoImpl();
TokenStaff ts = new TokenStaff();
@GET
@Produces(MediaType.APPLICATION_JSON) …Run Code Online (Sandbox Code Playgroud) 我想读取控制台输出日志,并且我知道它们存储在文件 catalina.out 下的“log”文件夹中,但它不存在!我尝试了不同的方法,但没有结果。我不知道如何弄清楚,我只想查看我的java输出日志
angularjs ×3
java ×3
javascript ×2
json ×2
rest ×2
android ×1
asynchronous ×1
catalina.out ×1
console ×1
function ×1
jersey ×1
promise ×1
sdk ×1
system.out ×1
tomcat ×1